![]() |
Fun 0.41.5
The programming language that makes you have fun!
|
Implements the OP_RUST_HELLO opcode (conditional build). More...
Go to the source code of this file.
Functions | |
| if (!s) s | |
| push_value (vm, make_string(s)) | |
Variables | |
| case | OP_RUST_HELLO |
| break | |
Implements the OP_RUST_HELLO opcode (conditional build).
This opcode demonstrates calling into a Rust function from the VM. When FUN_WITH_RUST is enabled at build time, it retrieves a greeting string from Rust and pushes it as a VAL_STRING onto the VM stack. When Rust support is disabled, a runtime error is raised and Nil is pushed to keep stack consistency.
OP_RUST_HELLO: () -> string | Nil
Behavior (FUN_WITH_RUST=ON):
Behavior (FUN_WITH_RUST=OFF):
Definition in file hello.c.
| if | ( | ! | s | ) |
Definition at line 40 of file make_array.c.
| push_value | ( | vm | , |
| make_string(s) | ) |