regNames
[32]stringregNames are the ABI names, because nobody reading a register dump thinks in x-numbers and every compiler's output is annotated with these.
- OID
- 0b9af5…7796:4
regNames details
Render
func(path string) stringRender is the realm's gnoweb view. - "/" the samples, the instance list, and what the numbers mean. - "/\<id>" one instance: its status, fuel, output and register file.
- OID
- 0b9af5…7796:5
Render details
renderHome
func() string- OID
- 0b9af5…7796:7
renderHome details
renderInstance
func(id string) string- OID
- 0b9af5…7796:8
renderInstance details
renderRegisters
func(inst *v0.Instance) stringrenderRegisters restores the snapshot to read the register file out of it. The hart is not kept between transactions, only its snapshot is, so this is the only place the state is legible, and it is the thing worth seeing: a program that wrote nothing still computed something.
- OID
- 0b9af5…7796:9
renderRegisters details
fuelText
func(n int64) string- OID
- 0b9af5…7796:10
fuelText details
hexDigits
untyped stringValue
"0123456789abcdef"
hexDump
func(b []uint8, max int) stringhexDump shows the image as words, which is how anyone reading RV32 reads it.
- OID
- 0b9af5…7796:11
hexDump details
printable
func(b []uint8, max int) stringprintable renders guest output for a code fence: printable ASCII as itself, everything else as an escape. A guest writes arbitrary bytes, so this is the only form of it that is safe to show.
- OID
- 0b9af5…7796:12
printable details
MaxInstances
untyped bigintCaps. Everything a caller can grow is bounded, because all of it is storage somebody pays a deposit on.
Value
(64 <untyped> bigint)
MaxImage
untyped bigintCaps. Everything a caller can grow is bounded, because all of it is storage somebody pays a deposit on.
Value
(8192 <untyped> bigint)
MaxOutput
untyped bigintCaps. Everything a caller can grow is bounded, because all of it is storage somebody pays a deposit on.
Value
(4096 <untyped> bigint)
MaxInput
untyped bigintCaps. Everything a caller can grow is bounded, because all of it is storage somebody pays a deposit on.
Value
(1024 <untyped> bigint)
DefaultFuel
untyped bigintCaps. Everything a caller can grow is bounded, because all of it is storage somebody pays a deposit on.
Value
(100000 <untyped> bigint)
MaxSliceFuel
untyped bigintCaps. Everything a caller can grow is bounded, because all of it is storage somebody pays a deposit on.
Value
(100000 <untyped> bigint)
store
*v0.Store- OID
- 0b9af5…7796:14
store details
inputs
*v0.Tree- OID
- 0b9af5…7796:19
inputs details
idgen
v0.IDValue
<zero>
count
intValue
3
host
typehost is the realm-backed [vmkit.Host](/gno.land/p/moul/x/vm/vmkit/v0#Host). One is built per call, wrapping the instance being stepped, so a guest's output and authority are scoped to it and nothing ambient leaks in.
Value
v0.host
Upload
func(hexImage string, input string, budget int64) stringUpload stores a hex-encoded text image as a new instance and returns its id. The image is loaded here rather than at the first Step, so a misaligned or oversized one is rejected by the transaction that submitted it instead of costing somebody else the gas later.
- OID
- 0b9af5…7796:23
Upload details
UploadSample
func(name string, input string, budget int64) stringUploadSample stores one of the programs the front page offers. Writing RV32IM by hand is not the point of this realm, and without this nobody without a cross compiler could press a button.
- OID
- 0b9af5…7796:25
UploadSample details
upload
func(img []uint8, input string, budget int64) string- OID
- 0b9af5…7796:26
upload details
Step
func(id string, fuel int64) stringStep runs one slice of the instance: up to \`fuel\` guest instructions, then stop and keep the snapshot. Anyone may pay for a slice, not only the owner: a paused program that only its owner can advance is a worse demo and no safer, since the program and its budget were both fixed at upload.
- OID
- 0b9af5…7796:27
Step details
Remove
func(id string)Remove deletes an instance. Owner only.
- OID
- 0b9af5…7796:28
Remove details
inputOf
func(id string) string- OID
- 0b9af5…7796:29
inputOf details
decodeHex
func(s string) ([]uint8, bool)decodeHex accepts the output of any hexdump: an even number of hex digits, with an optional 0x prefix, and whitespace anywhere. Whitespace is allowed because that is what a pasted hexdump has in it; anything else is refused, because a silently mangled image would trap somewhere unrelated later.
- OID
- 0b9af5…7796:30
decodeHex details
hexVal
func(c uint8) (uint8, bool)- OID
- 0b9af5…7796:31
hexVal details
sample
typeThe programs the front page offers, as the machine words a cross compiler would have emitted. They are assembled outside this repo and pinned here, and riscvdemo\_test.gno runs every one of them to the expected answer, so a wrong word is a failing test rather than a page that traps when clicked.
Value
v0.sample
samples
[]v0.sample- OID
- 0b9af5…7796:33
samples details
sampleByName
func(slug string) *v0.sample- OID
- 0b9af5…7796:44