Skip to main content

Crate stateset_sdk

Crate stateset_sdk 

Source
Expand description

§StateSet SDK

Rust-facing facade for the StateSet iCommerce platform.

This crate provides a curated set of feature-gated re-exports for Rust consumers who want a single dependency for the core commerce engine and optional sync, crypto, policy, and macro surfaces.

§Quick Start

[dependencies]
stateset-sdk = "1.23.3"
use stateset_sdk::prelude::*;

let commerce = Commerce::new("store.db")?;
let customer = commerce.customers().create(CreateCustomer {
    email: "alice@example.com".into(),
    first_name: "Alice".into(),
    last_name: "Smith".into(),
    ..Default::default()
})?;

§Features

FeatureDescriptionDefault
corePrimitives + Core + DB + Embedded + ObservabilityYes
cryptoVES v1.0 cryptographic operationsNo
policyDeclarative policy engineNo
macrosProc macros (StateSetId, GenerateDto, JsonSchema)No
syncOutbox-driven sync engine and sequencer transport facadeNo
fullAll features enabledNo

With sync enabled, [SyncRuntime] and [SyncRuntimeConfig] bundle the sync engine, sequencer HTTP transport, and runtime auth/options into a single Rust-facing helper surface for config loading, sync operations, JSON-ready runtime snapshots, kernel receipt queries, and local confirmation/dead-letter inspection. [SyncRuntimeConfig] can also load from JSON or environment variables via from_file, from_json_str, and from_env.

Re-exports§

pub use stateset_primitives as primitives;core
pub use stateset_core as core;core
pub use stateset_db as db;core
pub use stateset_embedded as embedded;core
pub use stateset_observability as observability;core

Modules§

preludecore
Commonly used types, re-exported for convenience.