Skip to content

Latest commit

 

History

History
84 lines (66 loc) · 2.54 KB

File metadata and controls

84 lines (66 loc) · 2.54 KB

Rustdoc

Auto-generated API documentation from source code.

Building Locally

# Basic documentation
cargo doc --workspace --no-deps --open

# With all features and private items
cargo doc --workspace --no-deps --all-features --document-private-items

# With scraped examples (nightly)
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc \
  -Zunstable-options \
  -Zrustdoc-scrape-examples \
  --all-features

Crate Documentation

After generating docs locally with cargo doc, you can browse documentation for each crate. See the per-crate API reference pages for type tables and usage examples:

Crate API Reference
tensor_store tensor_store API
relational_engine relational_engine API
graph_engine graph_engine API
vector_engine vector_engine API
tensor_chain tensor_chain API
neumann_parser neumann_parser API
query_router query_router API
tensor_cache tensor_cache API
tensor_vault tensor_vault API
tensor_blob tensor_blob API
tensor_checkpoint tensor_checkpoint API
tensor_unified tensor_unified API
tensor_compress tensor_compress API
tensor_spatial tensor_spatial API
neumann_shell neumann_shell API
neumann_server neumann_server API
neumann_client neumann_client API
neumann-ts TypeScript SDK API
neumann-py Python SDK API

Thread Safety

All engines inherit thread safety from TensorStore's SlabRouter:

use std::sync::Arc;
use std::thread;

let engine = Arc::new(RelationalEngine::new());

let handles: Vec<_> = (0..4).map(|i| {
    let engine = Arc::clone(&engine);
    thread::spawn(move || {
        engine.insert("users", values).unwrap();
    })
}).collect();

for handle in handles {
    handle.join().unwrap();
}

Async Operations

tensor_blob, tensor_cache, and tensor_checkpoint use async APIs:

use tokio::runtime::Runtime;

let rt = Runtime::new()?;
rt.block_on(async {
    let store = BlobStore::new(tensor_store, config).await?;
    store.put("file.txt", &data, options).await?;
    Ok(())
})?;