You do not have to author Rust yourself to benefit from Surrealism. Many teams will consume a pre-built .wasm file produced elsewhere (for example, an internal build pipeline or a vendor), whereas authoring a module means writing Rust, configuring surrealism.toml, and running surreal module yourself. This page focuses on the consumer path.
Storing the WASM file
SurrealDB needs access to the binary. Use DEFINE BUCKET to create or configure bucket storage and upload the .wasm according to the statement’s options (path, permissions, and naming depend on how you manage files in your environment).
Registering the module
Once the WASM is stored, DEFINE MODULE associates that bucket’s artefact with a module name and exposes the compiled functions to SurrealQL. The module definition must line up with how the plugin was built (exported function names and signatures).
Calling functions from SurrealQL
After the module is defined, call its exported functions like any other Surrealism entry point your version supports—typically by qualifying the function with the module you registered. Consult your plugin’s documentation for exact names and parameters. If you upgrade the .wasm, repeat the bucket upload and module definition steps (or your deployment automation) so the running instance picks up the new binary.
Further reading
Surrealism overview — how compilation, buckets, and modules fit together.
DEFINE BUCKETreference — file storage for WASM.DEFINE MODULEreference — registering Surrealism functions.