41 releases (14 breaking)

new 0.15.0 Sep 19, 2023
0.13.1 Jul 21, 2023
0.8.0 Mar 29, 2023
0.5.0 Dec 15, 2022
0.4.0 Nov 30, 2022

#268 in Filesystem

Download history 74/week @ 2023-06-03 53/week @ 2023-06-10 176/week @ 2023-06-17 110/week @ 2023-06-24 105/week @ 2023-07-01 149/week @ 2023-07-08 259/week @ 2023-07-15 102/week @ 2023-07-22 42/week @ 2023-07-29 129/week @ 2023-08-05 104/week @ 2023-08-12 18/week @ 2023-08-19 127/week @ 2023-08-26 40/week @ 2023-09-02 130/week @ 2023-09-09 78/week @ 2023-09-16

375 downloads per month
Used in 2 crates

MIT/Apache

715KB
15K SLoC

API Stability: Alpha

Noosphere

This is the entrypoint for most language-specific distributable packages the deal with accessing the Noosphere. It contains language-specific bindings and platform-sensitive behavior to provide a common set of high-level APIs.

Building Headers

To build the C FFI headers:

cargo run --features=headers --example generate_header

lib.rs:

This crate is a high-level entrypoint for embedders of the Noosphere protocol. Embedders may use [NoosphereContext] to initialize a singleton that enables manaing spheres, including creating new ones and joining existing ones.

#
let noosphere = NoosphereContext::new(NoosphereContextConfiguration {
    storage: NoosphereStorage::Scoped {
        path: "/path/to/block/storage".into(),
    },
    security: NoosphereSecurity::Insecure {
        path: "/path/to/key/storage".into(),
    },
    network: NoosphereNetwork::Http {
        gateway_api: Some(Url::parse("http://example.com")?),
        ipfs_gateway_url: None,
    },
})?;

noosphere.create_key("my-key").await?;

let SphereReceipt { identity, mnemonic } = noosphere.create_sphere("my-key").await?;
    
// identity is the sphere's DID
// mnemonic is a recovery phrase that must be stored securely by the user

let mut sphere_channel = noosphere.get_sphere_channel(&identity).await?;
let sphere = sphere_channel.mutable();

// Write something to the sphere's content space
sphere.write("foo", &ContentType::Text, "bar".as_bytes(), None).await?;
sphere.save(None).await?;
// Sync the sphere with the network via a Noosphere gateway
sphere.sync().await?;

Dependencies

~15–36MB
~588K SLoC