ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 3/5

surrealism

SurrealDB Surrealism WASM extension development. Write Rust functions, compile to WASM, deploy as database modules. Part of the surreal-skills collection.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/24601/surrealism
Or

What 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

  1. "OpenClaw, generate a new Surrealism project scaffolding for a custom string normalization utility that I can call via SurrealQL."
  2. "Explain the steps to define a new module in my SurrealDB instance using the surrealism toolchain, including the necessary DEFINE MODULE syntax."
  3. "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

Author@24601
Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-24601-surrealism": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#surrealdb#rust#wasm#database#backend
Safety Score: 3/5

Flags: file-write, file-read, code-execution