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
- 0b5e0a…b122:112
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
- 0b5e0a…b122:113
Render details
renderHome
func() string- OID
- 0b5e0a…b122:115
renderHome details
renderInstance
func(id string) string- OID
- 0b5e0a…b122:116
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
- 0b5e0a…b122:117
renderRegisters details
fuelText
func(n int64) string- OID
- 0b5e0a…b122:118
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
- 0b5e0a…b122:119
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
- 0b5e0a…b122:120
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"); the one character a table cell still needs escaped there is the pipe. printable has already removed the backtick and the newline, the other two that could break out.
- OID
- 0b5e0a…b122:121
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
- 0b5e0a…b122:123
store details
inputs
*v0.Tree- OID
- 0b5e0a…b122:128
inputs details
idgen
v0.IDValue
<zero>
count
intValue
6
host
typehost is the realm-backed [vmkit.Host](/gno.land/p/nym-moultest123/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
- 0b5e0a…b122:132
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
- 0b5e0a…b122:134
UploadSample details
upload
func(img []uint8, input string, budget int64) string- OID
- 0b5e0a…b122:135
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
- 0b5e0a…b122:136
Step details
Remove
func(id string)Remove deletes an instance. Owner only.
- OID
- 0b5e0a…b122:137
Remove details
inputOf
func(id string) string- OID
- 0b5e0a…b122:138
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
- 0b5e0a…b122:139
decodeHex details
hexVal
func(c uint8) (uint8, bool)- OID
- 0b5e0a…b122:140
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
- 0b5e0a…b122:142
samples details
sampleByName
func(slug string) *v0.sample- OID
- 0b5e0a…b122:153