The C3 SDK for Rust
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
src
tests
.gitignore
Cargo.lock
Cargo.toml
LICENSE
Makefile
README.md

README.md

c3-sdk-rust

The C3 SDK for Rust.

License Crates.io stability-experimental

NOTE: This is a work-in-progress.

Install

cargo install c3_sdk

Getting started

extern crate c3_sdk;

use std::collections::HashMap;
use self::c3_sdk::client::{Client, State};

fn main() {
    let mut client = Client::new();
    client.register_method("setItem".to_string(), |key: String, val: String| -> String {
        let store = HashMap::new();
        let mut state = State::new(store);
        state.set(key.clone(), val);
        return key;
    });
    client.serve();
}

Test

make test

License

GNU AGPL 3.0