The standard module automatically available to every supplied source module.
Signature
builtinUse builtin. to qualify prelude types, traits and interpreter functions explicitly, or refer to those names without an import. Primitive types, pi and callback-only entity/time/tick bindings do not use this qualifier.
builtin is reserved. Its definitions ship inside Rust; it does not fetch code, resolve package versions, or grant device permissions.
Examples
Qualify builtin names
Both qualified operations use the same prelude and interpreter as unqualified names.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
2
Rust definition
The compiler loads catalog::PRELUDE as a reserved module and resolves native registrations in Rust.
No matching builtins.
Values
Appends a bounded textual rendering of a value to the machine log without external I/O.
Signature
func print(value: T) -> UnitRendering must fit the machine string bound. Logs are a bounded ring buffer: when full, the oldest retained line is discarded, and no external I/O occurs.
Parameters
value: T- Any checked value whose rendered log text fits the machine string limit.
Returns
UnitUnit after the bounded log update.
Examples
Record a value
print writes the interpreter log.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
hello
Rust definition
Rust interpreter builtin dispatch; polymorphic calls and function values are checked from their concrete context.
noop
Does nothing and returns a successful Unit result; useful as a default zero-argument callback.
Signature
It is a concrete function value, so it can be stored in Button.action without a string callback name or a host effect.
Returns
Examples
Default action
noop is assignable to a zero-argument recoverable callback.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
(no log output)
Rust definition
Rust interpreter builtin dispatch; Type is func() -> Res[Unit, DataError].
ignore_number
Accepts and ignores one Number; useful as a default slider callback.
Signature
It is a concrete function value for Slider.action. The Number is checked then discarded, with no scene or host state update.
Parameters
value: f64- A Number accepted without a state change.
Returns
Examples
Default slider action
ignore_number has the Slider callback type.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
(no log output)
Rust definition
Rust interpreter builtin dispatch; Type is func(Number) -> Res[Unit, DataError].
bytes
Builds immutable bytes from checked unsigned 8-bit values.
Signature
Each element is a u8, so out-of-range literal bytes are compile errors. The Bin owns shared immutable storage and has no text encoding until decoded explicitly.
Parameters
Returns
BinImmutable packed bytes.
Examples
Builds immutable bytes from checked unsigned 8-bit values
Run the example, then change the data and inspect the result.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
AB
Rust definition
Rust SDK data primitives; the language checker specializes the same runtime operation.
Number
A finite IEEE 754 binary64 scalar with canonical language type f64.
Signature
Number remains a source alias for f64 and this host representation remains compatible with native spatial interfaces. Literals without numeric context default to f64. Exact integer widths and f16/f32/f128 use Scalar instead. Numeric variables never implicitly change dtype; use .convert[T]() for an explicit conversion, which rejects overflow and loss of information.
Methods
sin
Returns the numeric result or DataError when the operation cannot be represented.
cos
Returns the numeric result or DataError when the operation cannot be represented.
sqrt
Returns the numeric result or DataError when the operation cannot be represented.
abs
Returns the numeric result or DataError when the operation cannot be represented.
floor
Returns the numeric result or DataError when the operation cannot be represented.
ceil
Returns the numeric result or DataError when the operation cannot be represented.
min
Returns the numeric result or DataError when the operation cannot be represented.
max
Returns the numeric result or DataError when the operation cannot be represented.
clamp
Returns the numeric result or DataError when the operation cannot be represented.
pow
Returns the numeric result or DataError when the operation cannot be represented.
convert
Converts to explicit numeric dtype U or returns DataError when exact conversion fails.
Examples
Calculate a distance
Change either side length and inspect the hypotenuse.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
5
Rust definition
Value::Number(f64); one finite Rust f64 per language value.
See Numeric types for exact integer widths and floating-point formats.
Bool
A Boolean value used by conditions and short-circuit expressions.
Signature
Bool stores a Rust bool and has exactly two values: true and false. if and while require Bool; numeric zero and empty collections do not act as false. and and or evaluate their right side only when needed.
Examples
Combine conditions
The right side of and is skipped when ready is false.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
false true
Rust definition
Value::Bool(bool); conditions never coerce numbers or strings.
Str
Immutable UTF-8 text with canonical language type Str (String is an alias).
Signature
Clones share an Arc allocation. Concatenation creates a new value without implicit conversion. len, indexing, and slices count Unicode scalar values, while allocation limits count UTF-8 bytes. utf8 encodes to Bin and decode validates Bin as UTF-8. Text is the separate visible scene component.
Methods
Examples
Join and measure text
The accented character counts as one scalar value even though it uses two UTF-8 bytes.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
hello café 4
Rust definition
Value::Text(konjure_sdk::data::Str); shared immutable UTF-8 text.
String
Immutable UTF-8 text with canonical language type Str (String is an alias).
Signature
Clones share an Arc allocation. Concatenation creates a new value without implicit conversion. len, indexing, and slices count Unicode scalar values, while allocation limits count UTF-8 bytes. utf8 encodes to Bin and decode validates Bin as UTF-8. Text is the separate visible scene component.
Methods
Examples
Read existing source
The compatibility spelling resolves to the same immutable text type.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
text
Rust definition
Compatibility spelling of Str; new source uses Str.
Bin
Immutable bytes without an implied text encoding.
Signature
Cloning shares a packed Arc allocation. bytes constructs Bin from List[u8], Str.utf8 encodes text, and Bin.decode validates UTF-8 with a Res result. Indexing returns Res[u8, DataError]; slicing produces Res[Bin, DataError]. Concatenation creates independent data and respects byte limits.
Methods
Examples
Keep bytes distinct from text
Encoding is explicit; byte length and Unicode scalar count differ.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
4 5 café
Rust definition
Value::Bin(konjure_sdk::data::Bin); shared immutable byte storage.
Unit
The single empty value returned by procedures.
Signature
Unit is represented by the payload-free Rust Value::Unit variant and spelled () in the language. A function returning Unit may end without a value or use ret;. Unit is not null, an absent field, or an optional value.
Examples
Return from a procedure
The procedure logs its work; its result is the empty value ().
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
ready ()
Rust definition
Value::Unit; a Rust enum variant with no payload.
time
Accepted simulation time in seconds inside a system lifecycle callback.
Signature
time: Numbertime advances with accepted simulation ticks, not wall-clock time or browser rendering. The embedding host chooses the fixed cadence. Failed ticks do not publish new time; this immutable binding is unavailable at module scope.
Examples
Read simulation time
Step once: time is positive after the first accepted tick.
Press Step once to reach the checked result.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
true
Rust definition
Machine supplies accepted simulation seconds as Value::Number.
tick
The accepted simulation tick number inside a system lifecycle callback.
Signature
tick: Numbertick is an immutable Number supplied by the runtime. It counts accepted simulation updates; browser animation frames and rejected updates do not increment it. It is available only inside init, frame and done callbacks.
Examples
Count accepted updates
Step twice to log 1 and 2. Reset starts a fresh run.
Press Step 2 times to reach the checked result.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
1 2
Rust definition
Machine exposes its accepted tick counter as Value::Number.
i8
Signed 8-bit integer, from -128 through 127; checked arithmetic.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
i16
Signed 16-bit integer, from -32768 through 32767; checked arithmetic.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
i32
Signed 32-bit integer, from -2147483648 through 2147483647; checked arithmetic.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
i64
Signed 64-bit integer, from -9223372036854775808 through 9223372036854775807; checked arithmetic.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
i128
Signed 128-bit integer, from -170141183460469231731687303715884105728 through 170141183460469231731687303715884105727; checked arithmetic.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
u8
Unsigned 8-bit integer, from 0 through 255; checked arithmetic.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
u16
Unsigned 16-bit integer, from 0 through 65535; checked arithmetic.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
u32
Unsigned 32-bit integer, from 0 through 4294967295; checked arithmetic.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
u64
Unsigned 64-bit integer, from 0 through 18446744073709551615; checked arithmetic.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
u128
Unsigned 128-bit integer, from 0 through 340282366920938463463374607431768211455; checked arithmetic.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
f16
IEEE binary16: 11 significand bits, normal exponents -14 through 15, subnormals through 2^-24. Finite values only; ties-to-even rounding.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
f32
IEEE binary32: 24 significand bits, normal exponents -126 through 127, subnormals through 2^-149. Finite values only; ties-to-even rounding.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
f64
IEEE binary64: 53 significand bits, normal exponents -1022 through 1023, subnormals through 2^-1074. Finite values only; ties-to-even rounding.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
f128
IEEE binary128: 113 significand bits, normal exponents -16382 through 16383, subnormals through 2^-16494. Portable software arithmetic retains all 128 bits. Finite values only; ties-to-even rounding.
Signature
Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.
Methods
Examples
Calculate at a declared precision
Both operands have this dtype; changing the annotation changes its range and precision.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
42
Rust definition
Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.
Opt
An optional value that records presence explicitly.
Signature
enum Opt[T] { Some(T), None }Match both Some and None before using an optional result.
Cases
Some(T)- Contains a present value of T.
None- Records that no value is present.
Examples
Match an optional value
Both cases make absence explicit.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
4
Rust definition
Value::Enum with the concrete Opt[T] type and checked case payload.
Res
A recoverable success or error result.
Signature
enum Res[T, E] { Ok(T), Err(E) }Use ? to propagate Err to a compatible Res-returning boundary, or match both cases locally.
Cases
Ok(T)- Contains a successful value of T.
Err(E)- Contains a recoverable error of E.
Examples
Match a result
A result carries either its value or its error payload.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
4
Rust definition
Value::Enum with the concrete Res[T, E] type and checked case payload.
DataError
A stable recoverable error emitted by checked numeric, byte, and tensor operations.
Signature
enum DataError { ... }Each case name and description comes from the Rust SDK data-error registry.
Cases
TypeMismatch- An operation requires operands with the same declared element type.
InvalidLiteral- Text is not a valid literal of the requested type.
InvalidUtf8- Bytes are not valid UTF-8 where a text value is required.
Overflow- A value or checked integer operation exceeds the destination range.
NonFinite- Infinity and NaN cannot enter a portable data value.
InexactConversion- A conversion would round, truncate, or discard a signed zero.
DivisionByZero- Division or remainder has a zero divisor.
InvalidShape- Shape, rank, or buffer length is not a valid tensor layout.
ShapeMismatch- Shapes cannot participate in the requested operation.
Bounds- An index is outside the requested value.
InvalidSlice- Slice selectors are malformed, including a zero step.
InvalidMetadata- Decoded media metadata disagrees with its payload.
AllocationLimit- A checked allocation exceeds the portable data limit.
Examples
Handle invalid UTF-8
Decoding reports InvalidUtf8 instead of replacing malformed bytes.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
InvalidUtf8
Rust definition
konjure_sdk::data::DataError, carried in Res error payloads.
Collections
range
Creates a bounded sequence of exactly representable integer Numbers from start inclusive to end exclusive.
Signature
func range(end: Number) -> Res[List[Number], DataError]
func range(start: Number, end: Number) -> Res[List[Number], DataError]Each bound must be finite, integral, and exactly representable from -9007199254740991 through 9007199254740991. End is exclusive; descending bounds produce an empty list. Invalid endpoints return DataError; a host resource limit remains a Diagnostic.
Parameters
Returns
Examples
Range from zero
One bound starts at zero.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
3
Range with bounds
The start is inclusive and end is exclusive.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
3
Rust definition
Rust interpreter builtin dispatch; one- and two-argument Number overloads return Res[List[Number], DataError] for invalid numeric endpoints.
tensor
Constructs packed numeric data with explicit dimensions.
Signature
T is a numeric dtype. Values are row-major and their count must equal the checked product of the dimensions. Invalid shapes return Err(DataError). Host byte and execution limits reject execution before allocation.
Parameters
values: List[T]- Flat elements of the selected dtype; literals inherit T.
Returns
Examples
Constructs packed numeric data with explicit dimensions
Run the example, then change the data and inspect the result.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
3
Rust definition
Rust SDK data primitives; the language checker specializes the same runtime operation.
Tensor
An immutable packed Tensor[T] with shared storage and checked shape/stride views.
Signature
Tensor[T]A tensor stores one numeric dtype and a runtime shape. Comma-separated indices select scalar elements; slices preserve tensors and share their allocation. Arithmetic broadcasts trailing dimensions; @ multiplies matrices and batches. Arithmetic and indexing return Res; get returns Opt for a scalar lookup. Dtypes must match, with contextual typing reserved for literal operands.
Methods
len
len() -> f64Returns the receiver's element, byte, or Unicode scalar count.
get
Returns Some(value) for a valid index and None otherwise.
shape
Returns one nonnegative extent for each tensor axis.
reshape
Returns a reshaped tensor or DataError when dimensions do not fit.
transpose
Returns a reordered tensor or DataError for an invalid axis permutation.
sum
Returns the tensor sum or DataError when the operation cannot be represented.
matmul
Returns a matrix product or DataError when tensor shapes are incompatible.
convert
Converts to explicit numeric dtype U or returns DataError when exact conversion fails.
Examples
Slice a matrix
A slice is an immutable view; indexing with one integer per axis returns a typed scalar.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
[2, 2] Some(5)
Rust definition
Value::Tensor(konjure_sdk::data::Tensor); a numeric dtype, shape, strides and shared packed storage.
List
An ordered owned collection whose elements share one language type.
Signature
List[T]List[T] stores Rust Vec<Value> data. The compiler retains T and the runtime checks elements at typed boundaries. An empty literal needs a contextual element type, such as let values: List[f64] = [];.
Indexing starts at zero and rejects out-of-range indices. Assignment copies a list value; .append(value) returns a new list. .get(index) returns Opt[T], while indexing returns Res[T, DataError]. Collection length and nested values remain subject to the embedding host's Limits.
Methods
Examples
Append without changing the original
append returns a new list. Change the appended value and compare both lists.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
2 2 4 6
Rust definition
Value::List(Vec<Value>); static T and runtime validation enforce homogeneous elements.
Math
Vec3
A three-component numeric vector with zero defaults.
Signature
Spatial consumers interpret components as meters, directions, or radians based on their containing field; Vec3 itself carries no unit.
Fields
Examples
Construct a vector
Unset components retain their zero default.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
2
Rust definition
Interpreter RecordValue schema, copied by value at language boundaries.
Transform
Local pose and scale for an entity.
Signature
type Transform {
position: Vec3 = Vec3 {};
rotation: Vec3 = Vec3 {};
scale: Vec3 = Vec3 { x: 1, y: 1, z: 1 };
}Position is meters, rotation is XYZ Euler radians, and scale defaults to one on every axis. Physics owns the position and rotation of dynamic bodies.
Fields
Examples
Set a pose
Create a transform value in meters.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
2
Attach a renderable pose
A scene adapter reads Transform from an entity with geometry.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
1
Rust definition
Interpreter RecordValue schema consumed by spatial adapters.
pi
The mathematical constant pi, available as a Number.
Signature
pi: Numberpi is a finite binary64 approximation. Angles passed to sin and cos are radians; one full turn is 2 * pi. The name is available in ordinary expressions.
Examples
Measure a circle
The circumference scales linearly with the radius.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
12.566370614359172
Rust definition
The Rust interpreter installs std::f64::consts::PI as a Number binding.
Entities
spawn
Creates an entity with one record component and returns its opaque identity.
Signature
func spawn(component: C) -> EntityThe C placeholder means one concrete type value, never a trait or primitive. Entity creation is bounded and rejected when the machine has no remaining entity capacity.
Parameters
component: C- A constructed type value; traits and primitive values are rejected.
Returns
EntityThe new Entity identity.
Examples
Create an entity
A spawned component receives the first entity identity.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
entity(1)
Rust definition
Rust interpreter builtin dispatch; Type is specialized from a concrete type argument.
add
Adds a record component to an existing entity.
Signature
C means a concrete type value. Adding a component that the entity already owns, or addressing a missing entity, rejects the current transaction.
Parameters
entity: Entity- An existing entity identity.
component: C- A type value whose type is not already attached.
Returns
UnitUnit after the component update is accepted.
Examples
Add a component
A new Sphere component becomes queryable on the entity.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
true
Rust definition
Rust interpreter builtin dispatch; Type is specialized from the concrete component type.
get
Reads a typed component copy from an entity; the entity must have that component.
Signature
func get[C](entity: Entity) -> CC means a concrete type selector. The result is a component copy; update the live entity with set, or use a system binding or bind[C](entity) method callback for persistent mutation.
Parameters
entity: Entity- An entity that has the selected concrete type component.
Returns
CA copy of component C.
Examples
Select a component
The explicit selector fixes the component type for a function value.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
2
Rust definition
Rust interpreter builtin dispatch; C must name a concrete type and is checked during specialization.
set
Replaces an existing record component on an entity.
Signature
C means a concrete type value. set requires that component to exist already and replaces it atomically; use add for a new component.
Parameters
entity: Entity- An entity that already has the component type.
component: C- The replacement type value.
Returns
UnitUnit after the replacement is accepted.
Examples
Replace a component
set updates an already attached component.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
2
Rust definition
Rust interpreter builtin dispatch; Type is specialized from the concrete component type.
has
Tests whether an entity has the selected concrete component type.
Signature
C means a concrete type selector. The result observes the entity's current component set and rejects an unknown entity rather than inventing absence.
Parameters
entity: Entity- An existing entity identity.
Returns
BoolTrue when the entity has component C.
Examples
Test component presence
The selector is required when the function value would otherwise not identify C.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
true
Rust definition
Rust interpreter builtin dispatch; C must name a concrete type and is checked during specialization.
query
Returns entity identities that have the selected type or implement the selected trait.
Signature
C means a concrete type or trait selector. The returned entity handles are ordered by creation and are a snapshot value; later lifecycle changes do not mutate the returned list.
Returns
Examples
Query matching entities
The selector makes the query function value concrete.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
1
Rust definition
Rust interpreter builtin dispatch; C is a checked concrete type or trait selector.
despawn
Schedules an entity for removal when the current initializer, callback, or action completes.
Signature
The entity must exist. Removal is deferred until the enclosing initializer, callback, or action completes so checked work sees a consistent world.
Parameters
entity: Entity- An existing entity identity.
Returns
UnitUnit; removal is deferred to preserve transactional execution.
Examples
Schedule removal
The current value remains printable while removal is pending.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
entity(1)
Rust definition
Rust interpreter builtin dispatch; Type is func(Entity) -> Unit.
bind
Binds a concrete entity component so extracted methods can update that live component transactionally.
Signature
func bind[C](entity: Entity) -> ComponentReference[C]C means a concrete type selector, never a trait. The reference owns an entity and component identity; extracted mutating methods commit back transactionally and fail if the component is unavailable.
Parameters
entity: Entity- An entity with the selected concrete type component.
Returns
ComponentReference[C]A ComponentReference[C] whose mutating extracted methods write back to that entity.
Examples
Bind a live component
A bound mutating method commits its component update.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
1
Rust definition
Rust interpreter builtin dispatch; C must name a concrete type and produces ComponentReference[C] for typed function values.
Entity
An opaque ECS identity created by spawn.
Signature
Entity stores a Rust u64 handle. IDs are allocated in creation order and cannot be constructed from a Number in the language. Copying a handle keeps the same identity; it does not duplicate the entity or its components.
Use get, set, has and bind with a concrete component type. A handle can outlive its entity, but subsequent access to a removed entity is rejected.
Examples
Share an entity identity
Both handles address the same entity, so the update through alias is visible through item.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
4
Rust definition
Value::Entity(u64); stable interpreter identity, not a pointer or a Rust SDK Entity struct.
ComponentReference
A typed entity/component identity used to capture live component methods.
Signature
ComponentReference[T] pairs a Rust entity ID with a canonical concrete type name. bind[T](entity) validates that the component exists; method calls resolve it again and commit accepted receiver changes transactionally.
This is an interpreter handle, not a Rust borrow or raw memory reference. Access component data with get and set; invoke methods through the reference. Invoking a reference after its entity disappears is an error.
Examples
Capture a live component method
Calling advance updates the stored component, rather than a copied receiver.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
1
Rust definition
Value::ComponentReference(ComponentReference); an entity ID and canonical component type resolved at invocation.
entity
The current entity handle inside a system lifecycle callback.
Signature
entity: Entityentity identifies the entity whose component join is being processed. It is immutable and available in init, frame and done, not at module scope. Use it to access other components or schedule removal at the callback boundary.
Examples
Inspect the current entity
Step once to see the two entities in creation order.
Press Step once to reach the checked result.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
entity(1) entity(2)
Rust definition
Machine supplies a Value::Entity for the currently executing system join.
Geometry
Render
A typed presentation contract with one render operation.
Signature
Querying Render implementers is language behavior. Rendering remains an adapter responsibility; declaring this trait never schedules an automatic render call.
Methods
Examples
Implement a render operation
The trait only checks the method contract.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
rendered
Rust definition
Trait declaration checked by the interpreter; graphics handles remain host-owned.
Sphere
A sphere centered at its entity origin.
Signature
The spatial adapter requires a positive radius before tessellation. A Sphere is also one of the two collision shapes accepted by RigidBody.
Fields
radius: f64- Radius in meters; defaults to 0.2 and must be positive for physics.Default
0.2
Examples
Create a sphere
Geometry becomes renderable when attached to an entity.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
0.5
Rust definition
Interpreter RecordValue geometry schema consumed by spatial adapters.
Box
An axis-aligned local box with full dimensions.
Signature
The spatial adapter validates positive dimensions before rendering. Box is one of the two collision shapes accepted by RigidBody; size uses full extents.
Fields
Examples
Create a box
Size records full extents, not half extents.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
2
Rust definition
Interpreter RecordValue geometry schema consumed by spatial adapters.
Cylinder
A cylinder aligned with local Y.
Signature
Radius and height must be positive when a spatial adapter tessellates this geometry. Cylinders currently render but are not RigidBody collision shapes.
Fields
Examples
Create a cylinder
The current spatial adapter renders it along local Y.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
2
Rust definition
Interpreter RecordValue geometry schema consumed by spatial adapters.
Quad
A rectangular local XY surface facing local +Z.
Signature
Width and height must be positive when rendered. The adapter expands Quad into two triangles with +Z normals; it is not a RigidBody collision shape.
Fields
Examples
Create a quad
The adapter places the surface in local XY.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
3
Rust definition
Interpreter RecordValue geometry schema consumed by spatial adapters.
Line
A line segment between two local positions.
Signature
Endpoints are passed through as meters. The adapter tessellates the segment for rendering; no positive length or physics collision contract is declared here.
Fields
Examples
Create a segment
Line endpoints are expressed in the entity's local coordinates.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
2
Rust definition
Interpreter RecordValue geometry schema consumed by spatial adapters.
Ray
A visual ray with an explicit finite length.
Signature
The adapter requires direction magnitude greater than 1e-12 and positive length. It normalizes an accepted direction before building the rendered line.
Fields
Examples
Create a ray
The default direction is local negative Z.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
-1
Rust definition
Interpreter RecordValue geometry schema consumed by spatial adapters.
Mesh
Indexed triangle geometry.
Signature
type Mesh { positions: Tensor[f32] = tensor[f32]([], [0, 3])?; indices: Tensor[u32] = tensor[u32]([], [0, 3])?; }The spatial adapter requires 3..=16384 positions and 1..=32768 triangles, validates indices, and computes normals when it builds a render mesh.
Fields
Examples
Define one triangle
Indices address positions in triples.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
3
Inspect an unfilled schema
Construction itself does not invoke the mesh adapter.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
0
Rust definition
Interpreter RecordValue geometry schema; adapter validation produces the render mesh.
PointCloud
A bounded set of points rendered with a shared radius.
Signature
type PointCloud { points: Tensor[f32] = tensor[f32]([], [0, 3])?; radius: Number = 0.02; }Rendering requires 1 through 16384 points and a positive radius. The adapter expands each point into tessellated sphere geometry, so this is not a point GPU primitive contract.
Fields
Examples
Create points
A spatial adapter consumes the points when the value is attached to an entity.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
2
Rust definition
Interpreter RecordValue geometry schema; the adapter expands points into render geometry.
Material
Surface appearance for geometry rendered by the spatial adapter.
Signature
The adapter validates color as #RRGGBB or #RRGGBBAA. Roughness must be in 0..=1 and emissive intensity in 0..=100. Renderable geometry receives default Transform and Material values when omitted.
Fields
Examples
Attach material
Geometry receives a default material if none is attached by the spatial adapter.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
#ff0000
Rust definition
Interpreter RecordValue appearance schema consumed by spatial adapters.
Physics
RigidBody
Physical-body configuration for a Sphere or Box entity.
Signature
type RigidBody {
kind: Str = "dynamic";
mass: Number = 1;
velocity: Vec3 = Vec3 {};
angular_velocity: Vec3 = Vec3 {};
restitution: Number = 0.3;
friction: Number = 0.5;
}kind must be dynamic, fixed, or kinematic. Only dynamic bodies accept Force or Impulse; fixed bodies must have zero velocities.
Fields
Examples
Advance a dynamic sphere
Systems run before physics in each fixed tick, so the second callback observes the position advanced by the first integration step.
Press Step 2 times to reach the checked result.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
true
Choose a fixed body
Fixed bodies keep zero velocity.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
fixed
Rust definition
Interpreter RecordValue physics schema consumed by the Rapier-backed spatial adapter.
Force
A world-space force applied every fixed physics tick.
Signature
The physics adapter applies it only to a dynamic RigidBody and reapplies the current value on each fixed step. Attaching Force without such a body is rejected.
Fields
Examples
Apply force on fixed ticks
The second callback observes movement produced by the first fixed integration step; the force remains attached for later steps.
Press Step 2 times to reach the checked result.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
true
Rust definition
Interpreter RecordValue force schema consumed by the physics adapter.
Impulse
A world-space impulse consumed once by physics reconciliation.
Signature
The physics adapter accepts it only with a dynamic RigidBody, applies it once, then resets value to zero. Attaching Impulse without such a body is rejected.
Fields
Examples
Apply one impulse
The second callback observes movement from the first integration step, after which the adapter has consumed the impulse.
Press Step 2 times to reach the checked result.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
true
Rust definition
Interpreter RecordValue impulse schema consumed by the physics adapter.
Interface
Click
A typed interaction contract with one click operation.
Signature
Implement Click when a type should satisfy a nominal interaction contract or appear in query[Click](). Hosts may also invoke an ordinary checked click method without this trait; the host owns event dispatch.
Methods
Examples
Implement a click action
A type satisfies the contract with a matching typed method.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
clicked
Rust definition
Trait declaration checked by the interpreter; it is not a Rust SDK trait.
Text
Visible text content represented as a host UI schema.
Signature
Text is a declarative value only: layout, fonts, glyph shaping, and drawing remain host responsibilities. Constructing it never performs text rendering by itself.
Fields
Examples
Create text
Construction records content but does not itself draw it.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
hello
Rust definition
Interpreter RecordValue schema; text layout and drawing are host responsibilities.
Button
A host-rendered control with a typed no-argument action.
Signature
The host invokes action through Machine::invoke_component. The default noop is intentional; a Button schema never dispatches an action by itself.
Fields
Examples
Use the default action
The default callback is callable and produces no log output.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
Button
Expose a clickable control
The spawned control retains a typed callback for host click dispatch; initialization makes the example's ready state observable.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
button ready
Rust definition
Interpreter RecordValue UI schema; host input dispatch owns actual clicks.
Slider
A host-rendered numeric control with a typed value action.
Signature
type Slider {
label: Str = "Slider";
action: func(Number) -> Res[Unit, DataError] = ignore_number;
min: Number = 0;
max: Number = 1;
value: Number = 0;
}The host supplies a Number to action. A callback accepting input owns any update to Slider.value; schema construction and host input do not mutate it automatically.
Fields
label: Str- Visible label; defaults to Slider.Default
"Slider" action: func(f64) -> Res[Unit, DataError]- Typed callback accepting the requested numeric value; defaults to ignore_number.Default
ignore_number min: f64- Lower requested bound; defaults to 0. Hosts should present min no greater than max.Default
0 max: f64- Upper requested bound; defaults to 1. Hosts should present max no less than min.Default
1 value: f64- Current requested numeric value; defaults to 0 and changes only through explicit checked state updates.Default
0
Examples
Inspect defaults
The default range is 0 through 1.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
1
Expose a changeable control
Change Gain: set_gain clamps the input, updates the stored Slider value, and logs the accepted value.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
slider ready
Rust definition
Interpreter RecordValue UI schema; host input dispatch owns actual slider interaction.
Media
Image
An image resource request with display dimensions.
Signature
This schema declares desired resource data only. A host resolves source, owns I/O and permissions, and reports any loading failure; construction performs no I/O.
Fields
Examples
Describe an image
No file is read until a host chooses to resolve the source.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
poster.png
Rust definition
Interpreter RecordValue resource schema, not an image decoder or Rust SDK image handle.
Video
A video resource request with display dimensions.
Signature
This is a schema, not playback: the host owns decoding, timing, I/O, and any playback controls. Constructing it never starts a video.
Fields
Examples
Describe a video
The host decides whether and how the named resource plays.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
clip.mp4
Rust definition
Interpreter RecordValue resource schema, not a video decoder or playback handle.
VideoStream
A live video input request with display dimensions.
Signature
type VideoStream {
source: Str = "camera";
width: Number = 1;
height: Number = 1;
}The host owns permission, capture lifecycle, frame orientation, and resource contention. The default camera string is only a requested source selector.
Fields
Examples
Request a stream
A host must grant permission and create the actual capture session.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
camera
Rust definition
Interpreter RecordValue stream schema, not a camera session or frame source.
Audio
An audio resource request with a gain value.
Signature
This schema does not decode or play audio. The host resolves source, owns I/O and playback lifecycle, and interprets the requested linear gain.
Fields
Examples
Describe audio
Construction does not resolve or play the source.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
0.5
Rust definition
Interpreter RecordValue resource schema, not an audio decoder or playback handle.
AudioStream
A live audio input request with a gain value.
Signature
type AudioStream { source: Str = "microphone"; volume: Number = 1; }The host owns microphone permission, capture lifecycle, and stream routing; this declaration does not open a microphone.
Fields
Examples
Request audio input
A host must grant permission and create any actual stream.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
microphone
Rust definition
Interpreter RecordValue stream schema, not a microphone session or audio buffer.
ImageFrame
Decoded byte pixels with an explicit channel axis.
Signature
type ImageFrame { pixels: Tensor[u8]; }Pixels have shape [height, width, channels], with 1, 3 or 4 channels for Gray, RGB or RGBA. Construction uses the SDK Image validator. Channel order follows the last axis; this value contains no encoded file or device handle.
Fields
Examples
Construct ImageFrame
Inspect the typed payload and metadata.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
[1, 1, 4]
Rust definition
A checked language record delegating decoded media validation to konjure_sdk::data.
AudioBlock
Decoded audio samples with a checked sample rate.
Signature
type AudioBlock { samples: Tensor[f32]; sample_rate: u32; }Samples have shape [sample_frames, channels] and finite f32 values. The SDK validates channel count and sample rate. This is a decoded block; playback, capture and scheduling belong to the host.
Fields
sample_rate: u32- Samples per second, from 1 through 384000.
Examples
Construct AudioBlock
Inspect the typed payload and metadata.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
[4, 1] 48000
Rust definition
A checked language record delegating decoded media validation to konjure_sdk::data.
VideoFrame
A decoded image associated with a presentation timestamp.
Signature
type VideoFrame { image: ImageFrame; timestamp_ns: u64; }Nanoseconds are exact u64 values, independent of wall-clock time. Place frames in a VideoClip to validate timestamp order and consistent image layout. A frame can be exchanged without starting a player or camera.
Fields
image: ImageFrame- A validated decoded image.
timestamp_ns: u64- Presentation timestamp in nanoseconds; no wall-clock origin is implied.
Examples
Construct VideoFrame
Inspect the typed payload and metadata.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
16666667
Rust definition
A checked language record delegating decoded media validation to konjure_sdk::data.
VideoClip
An immutable-value sequence of validated decoded video frames.
Signature
type VideoClip { frames: List[VideoFrame]; }The SDK requires a nonempty sequence, strictly increasing timestamps and consistent image dimensions, dtype and channel format. Tensor buffers retain shared ownership. A live stream additionally needs host backpressure and lifetime handling.
Fields
frames: List[VideoFrame]- A nonempty ordered list of decoded frames with matching layouts.
Examples
Construct VideoClip
Inspect the typed payload and metadata.
Show a QR code for your glasses, or send a link to another browser. You can keep working here.
Sharing starts a fresh run of the last compiled code. Your editor draft stays here.
Join a session
Open an invitation link, or paste a link or code from the other device.
On RayNeo, open Menu → Connect live and scan this code. In another browser, open the invitation link below.
Or enter this code:
Waiting for another device. You can keep working while it connects.
Browsers can edit code; every device can use scene controls. The device that started the session controls playback.
Connection settings
A full invitation link includes its host. With a code alone, both devices need the same live host. Pairing setup
No output.
- Executed source spans appear here.
Expected output
2
Rust definition
A checked language record delegating decoded media validation to konjure_sdk::data.