Rust crates
The public Rust crates of the Cua SDK, how to depend on them, and what is stable.
Rust hosts (CLIs, Tauri apps, services) use the crates directly instead of a binding. The crates are not on crates.io, so there is no docs.rs page: each crate has one page here with every public item.
| Crate | What it is | Reference |
|---|---|---|
cua-sdk | The cua SDK: the only #[uniffi::export] crate of libs/cua. | cua-sdk |
cua-spacesd-client | Ergonomic async client for cua-spacesd (cua.env.v1). | cua-spacesd-client |
Depend on a crate#
Depend on them from git, pinned to a release tag or a commit:
[dependencies]
cua-sdk = { git = "https://github.com/trycua/cua", tag = "cua-sdk-v<version>" }
tokio = { version = "1", features = ["full"] }Inside this repository, use a path dependency (path = "libs/cua/crates/cua-sdk"). The crates build with the toolchain in libs/cua/rust-toolchain.toml.
Stability#
- All crates release in lockstep with the SDK version under one
cua-sdk-v<version>tag. Mix crates from one tag only. - Stable:
cua-sdkand thecua-spacesd-clientclient. Before 1.0 a minor release may break them, with a deprecated alias kept for at least one minor release where possible (for exampleEnvClient, nowSpacesdClient). Patch releases never do. - Unstable:
cua-sandbox-coreandcua-spacesfollow the Spaces service and can change in any minor release, so they have no pages here: runcargo doc -p cua-spaces --openinlibs/cuato read them. Items namedtesting,conformanceorcoverageare test support, not API. - Not API: items hidden from these pages (
#[doc(hidden)]), the UniFFI scaffolding (uniffi_*,ffi_*), and cargo features other than the defaults.
Other workspace crates (cua-proto, cua-daemon, cua-daemon-core, cua-vmm, cua-image, the media crates, cua-cli) are implementation details. The Cua Spaces crates (cua-spaces-ext, cua-spaces-ffi, cua-spaces-cli, cua-spaces-app-core, cua-teleport, cua-keyvault, cua-volume) are source-available under FSL-1.1-MIT and not part of the SDK. The wire contract is the protocol reference. Each page shows item summaries and declarations; cargo doc --open in libs/cua has the full comments.