Expand description
Raw native functions for services to use
This is the set of raw native functions (wasm imports). They are available for services to use directly, but we recommend using the Wrapped Native Functions instead.
Structs§
Enums§
Functions§
- abort
Message ⚠ - Abort with
message - abort
Subjective ⚠ - call⚠
- Call a service, store the return value into result, and return the result size
- checkout
Subjective ⚠ - clock
Time ⚠Get - Gets the current value of a clock in nanoseconds.
- commit
Subjective ⚠ - export
Handles ⚠ - getCurrent
Action ⚠ - Store the currently-executing action into result and return the result size
- getKey⚠
- Copy
min(dest_size, key_size)bytes of the most-recent key into dest and returnkey_size - getRandom⚠
- Fills a buffer with random bytes
- getResult⚠
- Copy
min(dest_size, resultSize - offset)bytes fromresult + offsetintodestand returnresultSize - import
Handles ⚠ - kvClose⚠
- Closes a key-value database
- kvGet⚠
- Get a key-value pair, if any
- kvGreater
Equal ⚠ - Get the first key-value pair which is greater than or equal to the provided key
- kvLess
Than ⚠ - Get the key-value pair immediately-before provided key
- kvMax⚠
- Get the maximum key-value pair which has key as a prefix
- kvOpen⚠
- Opens a key-value database
- kvOpen
At ⚠ - Opens a subtree of a key-value database
- kvPut⚠
- Set a key-value pair
- kvRemove⚠
- Remove a key-value pair if it exists
- setMax
CpuTime ⚠ - Sets the CPU timer to expire after the current transaction/query/callback context has run for a given number of nanoseconds. When the timer expires, the current context will be terminated. Setting the timeout replaces any previous timeout.
- setRetval⚠
- Set the currently-executing action’s return value
- socket
Open ⚠ - Starts a new HTTP request
- socket
Send ⚠ - Send a message to a socket
- socket
SetFlags ⚠ - Change flags on a socket. The mask determines which flags are set.
- write
Console ⚠ - Write
messageto console