MCPcopy Index your code
hub / github.com/Nisoku/Saikuro

github.com/Nisoku/Saikuro @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
2,861 symbols 9,985 edges 253 files 565 documented · 20%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Saikuro

A language-agnostic, easy-to-use IPC library for cross-language integration.

Saikuro lets you expose functions written in one language and call them transparently from any other supported language, with a shared typed schema, capability enforcement, and pluggable transports (TCP, Unix socket, WebSocket, or in-memory).


Supported languages

(Saikuro currently is not added to package managers yet. It will be added soon, once I finalize a few things!)

Language Package name Status
Rust (TBD)
TypeScript (TBD)
Python (TBD)
C# (TBD)
C (TBD)
C++ (TBD)

Quick start

Rust provider

use saikuro::{Provider, Result, Value};

#[tokio::main]
async fn main() -> Result<()> {
    let mut provider = Provider::new("math");

    provider.register("add", |args: Vec<Value>| async move {
        let a = args[0].as_i64().unwrap_or(0);
        let b = args[1].as_i64().unwrap_or(0);
        Ok(serde_json::json!(a + b))
    });

    provider.serve("tcp://127.0.0.1:7700").await
}

TypeScript client

import { SaikuroClient } from "@nisoku/saikuro";

const client = await SaikuroClient.connect("tcp://127.0.0.1:7700");
const result = await client.call("math.add", [1, 2]);
console.log(result); // 3

Python client

from saikuro import SaikuroClient

async def main():
    async with SaikuroClient.connect("tcp://127.0.0.1:7700") as client:
        result = await client.call("math.add", [1, 2])
        print(result)  # 3

Repository layout

Build/
  Cargo.toml          # Rust workspace root
  crates/             # Internal library crates
    saikuro-core/       Protocol types, envelope, error
    saikuro-schema/     Schema registry & validation
    saikuro-transport/  Transport backends (TCP, Unix, WebSocket, InMemory, WasmHost)
    saikuro-router/     Invocation router & provider registry
    saikuro-runtime/    Embeddable runtime (includes standalone server binary)
    saikuro-exec/       Execution backends (Tokio, WASM, Embassy)
    saikuro-storage/    Storage backends (InMemory, SQLite, Sled, IndexedDB, OPFS, …)
    saikuro-codegen/    Binding code-generator for all 6 languages
  tests/              # Rust integration tests
  adapters/
    rust/             Rust adapter (saikuro crate)
    typescript/       TypeScript/JS adapter
    python/           Python adapter
    csharp/           C# adapter
    c/                C FFI adapter
    cpp/              C++ RAII adapter
Demo/                 Browser WASM demo (Rust, C, C++, Python, C# providers)
Docs/                 Documentation site
Examples/             Standalone example projects

Documentation

Full documentation is available at the project's GitHub Pages site:

Repository docs sources:

  • Docs/docs/index.md
  • Docs/docs/adapters/index.md
  • Docs/docs/guide/

Contributing

Contributions are welcome! Here’s how to get started:

  1. Fork the repository.
  2. Create a branch for your feature, adapter, or bug fix (git checkout -b feature/name).
  3. Commit your changes (git commit -m "Description of change").
  4. Push your branch (git push origin feature/name).
  5. Open a Pull Request.

Please make sure your changes follow the existing style and that all tests pass before submitting.

See CONTRIBUTING for more details.


Star History

Star History Chart


License

Apache-2.0. See LICENSE.

Extension points exported contracts — how you extend this code

BindingGenerator (Interface)
A language-specific binding generator. [6 implementers]
Build/crates/saikuro-codegen/src/generator.rs
TransportLike (Interface)
(no doc) [20 implementers]
Build/adapters/typescript/src/logger.ts
Window (Interface)
(no doc)
Demo/src/types/global.d.ts
TypeConverter (Interface)
Language-specific type name conversion. Every codegen backend has a match over `TypeDescriptor` variants that produces [6 …
Build/crates/saikuro-codegen/src/generator.rs
Transport (Interface)
(no doc) [2 implementers]
Build/adapters/typescript/src/transport/types.ts
KeyValueBackend (Interface)
(no doc) [7 implementers]
Build/crates/saikuro-storage/src/traits.rs
IDeliverable (Interface)
Used internally so both typed stream/channel impls can be stored uniformly.
Build/adapters/csharp/Saikuro/src/Client.cs
StorageBackend (Interface)
(no doc) [7 implementers]
Build/crates/saikuro-storage/src/traits.rs

Core symbols most depended-on inside this repo

clone
called by 241
Build/crates/saikuro-exec/src/wasm_backend.rs
send
called by 235
Build/adapters/typescript/src/logger.ts
block_on
called by 218
Build/crates/saikuro-exec/src/wasm_backend.rs
recv
called by 148
Build/adapters/typescript/src/transport/types.ts
get
called by 103
Build/crates/saikuro-router/src/provider.rs
close
called by 95
Build/adapters/typescript/src/transport/types.ts
split
called by 94
Build/crates/saikuro-transport/src/tcp.rs
spawn
called by 90
Build/crates/saikuro-exec/src/wasm_backend.rs

Shape

Method 1,406
Function 998
Class 388
Interface 37
Enum 32

Languages

Rust48%
C#21%
Python15%
TypeScript11%
C++4%
C1%

Modules by API surface

Build/adapters/csharp/Saikuro/tests/BroadcastChannelTests.cs69 symbols
Build/adapters/csharp/Saikuro/tests/EnvelopeTests.cs63 symbols
Build/adapters/csharp/Saikuro/src/Provider.cs58 symbols
Build/adapters/python/tests/test_client.py54 symbols
Build/adapters/csharp/Saikuro/tests/ClientTests.cs54 symbols
Build/adapters/python/tests/test_envelope.py49 symbols
Build/adapters/csharp/Saikuro/tests/ProviderTests.cs49 symbols
Build/crates/saikuro-storage/src/opfs.rs46 symbols
Build/adapters/c/src/lib.rs46 symbols
Build/crates/saikuro-storage/src/fs_access.rs44 symbols
Build/adapters/csharp/Saikuro/src/Client.cs43 symbols
Build/adapters/typescript/src/client.ts42 symbols

For agents

$ claude mcp add Saikuro \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact