本文へ移動
cccskills
無料GitHub で公開

surrealism

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

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Surrealism -- WASM Extensions for SurrealDB

New in SurrealDB 3. Write custom functions in Rust, compile them to WebAssembly (WASM), and deploy them as native database modules callable from SurrealQL.

Prerequisites

  • Rust toolchain (stable) with wasm32-unknown-unknown target
  • SurrealDB CLI v3.1.4+ (surreal binary with surreal module subcommand)
  • Familiarity with SurrealQL DEFINE MODULE and DEFINE BUCKET

Development Workflow

1. Annotate   -- surrealism.toml + #[surrealism] on Rust functions
2. Compile    -- surreal module compile  (produces .wasm binary)
3. Register   -- DEFINE BUCKET + DEFINE MODULE in SurrealQL

Quick Start

# Create a new Surrealism project
cargo new --lib my_extension
cd my_extension

# Add the WASM target
rustup target add wasm32-unknown-unknown

# Create surrealism.toml (required manifest)
cat > surrealism.toml << 'TOML'
[package]
name = "my_extension"
version = "0.1.0"
TOML

# Write your extension (annotate with #[surrealism])
cat > src/lib.rs << 'RUST'
use surrealism::surrealism;

#[surrealism]
fn greet(name: String) -> String {
    format!("Hello, {}!", name)
}
RUST

# Compile to WASM using SurrealDB CLI
surreal module compile

# Register in SurrealDB
surreal sql --endpoint http://localhost:8000 --user root --pass root --ns test --db test
-- Grant access to the WASM file
DEFINE BUCKET my_bucket;

-- Register the module functions
DEFINE MODULE my_extension FROM 'my_bucket:my_extension.wasm';

-- Use the function in queries
SELECT my_extension::greet('World');

Use Cases

  • Custom scalar functions callable from SurrealQL
  • Fake/mock data generation for testing
  • Domain-specific logic (language processing, quantitative finance, custom encoding)
  • Access to niche Rust crate functionality too specific for core SurrealDB
  • Custom analyzers for full-text search

Status

Surrealism is actively in development and not yet stable. The API may change between SurrealDB 3.x releases. File feedback via GitHub issues/PRs on the surrealdb/surrealdb repository.

Full Documentation

See the main skill's rule file for complete guidance:

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

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.

日本語の概要は準備中です。原文の説明を表示しています。

24601/surreal-skills342026年6月18日 更新

surrealdb

無料

Expert SurrealDB 3 skill. Use when working with SurrealDB, SurrealQL queries, multi-model data modeling (document, graph, vector, time-series, geospatial), schema design, graph traversal, vector search, security and permissions, deployment and operations, performance tuning, SDK integration, Surrealism WASM extensions, SurrealMCP, Surrealist IDE, Surreal-Sync migrations, SurrealFS, SurrealKit, or ecosystem integrations such as n8n and CodeMirror.

日本語の概要は準備中です。原文の説明を表示しています。

24601/surreal-skills342026年6月18日 更新

surrealdb

無料

Expert SurrealDB 3 architect and developer skill (tracks v3.1.4+). SurrealQL mastery, multi-model data modeling (document, graph, vector, time-series, geospatial), schema design, security, deployment, performance tuning, SDK integration (JS, Python, Go, Rust, Java, .NET, C, PHP, Swift, Kotlin, Ruby), Surrealism WASM extensions, SurrealML scope coverage (preview), built-in MCP (v3.1+) and standalone SurrealMCP, LangChain Python integration, editor tooling (LSP v0.1.6, tree-sitter, CodeMirror v1.0.6, VS Code/JetBrains/Neovim/Zed), and ecosystem integrations (Surrealist v3.9, Surreal-Sync, SurrealFS, SurrealKit v0.7, n8n, Agent Skills, setup-surreal). Universal skill for 30+ AI agents.

日本語の概要は準備中です。原文の説明を表示しています。

24601/surreal-skills342026年6月18日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

24601/surreal-skills342026年6月18日 更新

SurrealKit schema sync, rollout migrations, seeding, and declarative testing for SurrealDB apps. Part of the surreal-skills collection.

日本語の概要は準備中です。原文の説明を表示しています。

24601/surreal-skills342026年6月18日 更新

SurrealDB MCP for AI agents: built-in server (SurrealDB 3.1+ `surreal mcp`) and standalone surrealmcp (surrealdb/surrealmcp v0.4.0). Part of the surreal-skills collection.

日本語の概要は準備中です。原文の説明を表示しています。

24601/surreal-skills342026年6月18日 更新

24601 のスキルをすべて見る

このスキルの問題を報告する