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:80
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:81
Render details
renderHome
func() string- OID
- 0b9af5…7796:83
renderHome details
renderInstance
func(id string) string- OID
- 0b9af5…7796:84
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:85
renderRegisters details
fuelText
func(n int64) string- OID
- 0b9af5…7796:86
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:87
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:88
printable details
codeCell
func(s string) stringcodeCell puts already-printable text in a code span inside a table cell. Inside backticks markdown escapes are not applied, so ui.Cell's backslashes would reach the reader verbatim ("Hello, gno\\.land"). md.InlineCode builds the span: empty text is no span at all (two bare backticks render as two backticks), a space at either end is padded so CommonMark's strip does not eat it, and the fence outscans any backtick run. The GFM row splitter runs before inline parsing, so the pipe is escaped on top.
- OID
- 0b9af5…7796:89
codeCell 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:91
store details
inputs
*v0.Tree- OID
- 0b9af5…7796:96
inputs details
idgen
v0.IDValue
<zero>
count
intValue
0
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:100
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:102
UploadSample details
upload
func(img []uint8, input string, budget int64) string- OID
- 0b9af5…7796:103
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:104
Step details
Remove
func(id string)Remove deletes an instance. Owner only.
- OID
- 0b9af5…7796:105
Remove details
inputOf
func(id string) string- OID
- 0b9af5…7796:106
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:107
decodeHex details
hexVal
func(c uint8) (uint8, bool)- OID
- 0b9af5…7796:108
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:110
samples details
sampleByName
func(slug string) *v0.sample- OID
- 0b9af5…7796:121