stateset-sdk 1.23.1

Rust SDK facade for StateSet iCommerce with feature-gated re-exports
docs.rs failed to build stateset-sdk-1.23.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: stateset-sdk-1.23.3

stateset-sdk

crates.io docs.rs

Start here. The Rust facade for StateSet iCommerce — one dependency, one prelude, feature-gated access to the commerce engine plus optional sync, crypto, policy, and macro surfaces.

If you're writing Rust against StateSet, add this crate rather than picking sibling crates by hand; it pins compatible versions of the whole set for you.

[dependencies]
stateset-sdk = { version = "1.23.1", features = ["full"] }

Or: cargo add stateset-sdk --features full

Usage

use stateset_sdk::prelude::*;

# fn main() -> Result<()> {
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()
})?;
# let _ = customer;
# Ok(())
# }

Feature Flags

Feature Description Default
core Primitives + Core + DB + Embedded + Observability Yes
crypto VES v1.0 cryptographic operations No
policy Declarative policy engine No
macros Proc macros (StateSetId, GenerateDto, JsonSchema) No
sync Outbox-driven sync engine and sequencer transport No
full Everything above No

Sync Runtime

With sync enabled, SyncRuntime and SyncRuntimeConfig bundle the sync engine, sequencer HTTP transport, and runtime auth into a single surface: config loading, sync operations, JSON-ready snapshots, kernel receipt queries, and confirmation/dead-letter inspection. SyncRuntimeConfig loads from a file, a JSON string, or the environment via from_file, from_json_str, and from_env.

What's Underneath

Crate Role
stateset-embedded The engine — commerce operations over SQLite or PostgreSQL
stateset-core Domain models, repository traits, validation, errors
stateset-primitives Typed IDs, Money, CurrencyCode, Sku
stateset-db SQLite and PostgreSQL implementations
stateset-observability Metrics and tracing bootstrap
stateset-crypto Canonical JSON, signing, hybrid PQ crypto
stateset-policy Declarative rule engine
stateset-sync Event-sourced outbox and sync engine

Serving HTTP instead of embedding? See stateset-http.

License

MIT OR Apache-2.0