How to use Surrealism to build your own custom SurrealDB extensions
Blog post from SurrealDB
SurrealDB 3.0 introduces a new feature called Surrealism, which allows users to write custom functions in Rust that can be directly accessed from the database, enabling enhanced and personalized functionalities. This feature addresses the limitation of existing user-defined functions and closures that are restricted to the SurrealQL query language, by allowing integration with the Cargo package manager and the crates.io ecosystem. Surrealism functions are compiled into WASM binaries, which can be linked to the database, providing a way to add new functionalities without altering the core database code. The blog post illustrates this with examples, such as creating mock data and handling Serbian text, demonstrating how users can build and share modules, similar to installing apps on a phone. The community-driven approach behind Surrealism is highlighted, encouraging users to develop and share their extensions, thereby expanding the capabilities of SurrealDB beyond its base version.