ce-net

Build a cell for ce-net

A cell is one function with a typed interface. Anyone on the network calls it by name, and the cell checks every call against a capability before it runs.

Get the SDK on GitHubQuickstart
git clone https://github.com/Leif-Rydenfalk/ce-sdk
cd ce-sdk
cargo run -p hello-echo -- demo hello
hello.echo answered: hello
a caller without the right: refused

That is a real call through the gate: a fresh key, one granted right, one answer, and a stranger turned away. No account and no node needed.

Name your cell

Names are area.function, lowercase. One cell does one thing.

cargo install --git https://github.com/Leif-Rydenfalk/ce-sdk ce-new
ce-new weather.now
cd weather-now
cargo run -p weather-now -- demo hello
Types crate
weather-now-api: the ops, their types, and the right each op needs. Callers depend on this.
Cell crate
weather-now: the function, and serve to run it behind your node.
Rights
weather.now:run and weather.now:health. A caller without the right is refused before your code runs.

Quickstart

  1. Install Rust

    Stable Rust 1.80 or newer and git. Nothing else.

  2. Make the cell

    cargo install --git https://github.com/Leif-Rydenfalk/ce-sdk ce-new
    ce-new weather.now && cd weather-now
    cargo test
  3. Write the function

    Declare the ops in weather-now-api/src/lib.rs:

    ce_wire::api! {
        api WeatherNow = "weather.now", version 1;
        types {
            pub struct Health { pub ok: bool, pub version: String, pub uptime_s: u64 }
            pub struct RunReq { pub input: String }
            pub struct RunResp { pub output: String }
            pub enum RunError { Invalid(String), Failed(String) }
        }
        ops {
            1 => HealthOp(()) -> Health, needs "weather.now:health";
            2 => Run(RunReq) -> Result<RunResp, RunError>, needs "weather.now:run";
        }
    }

    Then write the function in weather-now/src/lib.rs. Op 1, health, is the same in every cell.

  4. Clients for other languages

    cargo install --git https://github.com/Leif-Rydenfalk/ce-sdk ce-wire-gen
    ce-wire-gen --lang ts weather-now-api/src/lib.rs -o sdk/ts

    TypeScript, Swift and Python clients, generated from the same block. A stale client is refused at connect, never misread.

  5. Run it on the network

    weather-now serve runs the cell behind your ce node. Install a node with the one-line installer at ce-net.com/install; get an invite by listing a machine at ce-net.com/environment.

  6. Publish

    Open an issue or pull request on the SDK repository with a link to your cell, or propose it from your AI agent through the ce-net MCP server with the tool_add tool. A person reviews every new cell before it is listed.

What you can do today

Open now

  • The wire, the gate, the client generator and the template, as source.
  • Build, test and call your cell on your own machine.
  • Propose a cell for review.

Coming

  • Publishing without a review step.
  • Running a cell from a stranger in a sandbox on other machines.
  • A public listing of every cell, searchable by name.