surrealism
SurrealDB Surrealism WASM extension development. Write Rust functions, compile to WASM, deploy as database modules. Part of the surreal-skills collection.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/24601/surrealismWhat This Skill Does
The surrealism skill provides an end-to-end environment for building, managing, and deploying WebAssembly (WASM) extensions for SurrealDB. By leveraging Rust's type safety and performance, developers can define custom functions that reside directly within the database engine. This capability extends SurrealQL beyond its native feature set, allowing for complex business logic, custom encoding, or domain-specific data transformations that occur right at the database layer.
Installation
You can install this skill using the OpenClaw CLI:
clawhub install openclaw/skills/skills/24601/surrealism
Ensure you have the Rust toolchain installed, specifically the wasm32-unknown-unknown target. Additionally, ensure your SurrealDB CLI version is 3.0.0 or higher to support the surreal module command structure required for compilation and deployment.
Use Cases
- Complex Business Logic: Encapsulate proprietary algorithms in Rust for faster, secure execution inside the database.
- Data Transformation: Create custom scalar functions for unique formatting or data normalization that SurrealQL does not natively support.
- Mock Data Generation: Build custom generators for integration testing environments.
- Advanced Analytics: Integrate specialized Rust crates for quantitative finance or NLP tasks directly into your query workflows.
Example Prompts
- "OpenClaw, generate a new Surrealism project scaffolding for a custom string normalization utility that I can call via SurrealQL."
- "Explain the steps to define a new module in my SurrealDB instance using the surrealism toolchain, including the necessary DEFINE MODULE syntax."
- "Show me how to troubleshoot a WASM compilation error in my rust lib.rs file when using the #[surrealism] macro."
Tips & Limitations
- State Management: Remember that WASM modules in SurrealDB are generally stateless; avoid trying to maintain complex global state within the module.
- Resource Usage: Because WASM executes within the database memory space, inefficient code can impact overall database performance. Always profile your Rust functions.
- Compatibility: This skill is experimental. Be prepared for breaking API changes as the SurrealDB 3.x series progresses. Always check the official SurrealDB module documentation alongside this tool to stay aligned with current syntax requirements.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-24601-surrealism": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution
Related Skills
deep-research
Async deep research via Gemini Interactions API (no Gemini CLI dependency). RAG-ground queries on local files (--context), preview costs (--dry-run), structured JSON output, adaptive polling. Universal skill for 30+ AI agents including Claude Code, Amp, Codex, and Gemini CLI.
surrealfs
SurrealFS virtual filesystem for AI agents. Rust core + Python agent (Pydantic AI). Persistent file operations backed by SurrealDB. Part of the surreal-skills collection.
surrealdb
Expert SurrealDB 3 architect and developer skill. SurrealQL mastery, multi-model data modeling (document, graph, vector, time-series, geospatial), schema design, security, deployment, performance tuning, SDK integration (JS, Python, Go, Rust), Surrealism WASM extensions, and the wider ecosystem (Surrealist, Surreal-Sync, SurrealFS, SurrealKit). Universal skill for 30+ AI agents.
surreal-sync
Data migration and synchronization to SurrealDB from MongoDB, PostgreSQL, MySQL, Neo4j, Kafka, and JSONL. Full and incremental CDC sync. Part of the surreal-skills collection.