A collection of Rust templates for building Klave applications using cargo-generate. Each template provides a specialized foundation for different use cases within Trusted Execution Environments (TEEs).
Klave aims to make it easy to build and deploy WebAssembly applications within Trusted Execution Environments (TEEs) and leverage the latest developments in the WebAssembly component model and Wasmtime runtime.
For detailed documentation, please read the Klave docs.
To use these templates, ensure the following tools are installed:
- The Rust Toolchain (incl. rust, rustup, cargo)
cargo-generate:cargo install cargo-generatecargo-component:cargo install cargo-componentwasm32-unknown-unknowntarget:rustup target add wasm32-unknown-unknown
TEE attestation and quote verification functionality.
cargo generate --git https://github.com/klave-network/rust-template attestationFeatures: Quote generation, verification, and parsing for TEE security guarantees.
Basic ledger operations for persistent data storage.
cargo generate --git https://github.com/klave-network/rust-template ledgerFeatures: Load and insert operations with Klave's secure ledger.
Secure database connectivity with deterministic encryption.
cargo generate --git https://github.com/klave-network/rust-template postgreFeatures: PII encryption, secure database operations, and SQL query execution.
Ethereum-compatible light client for blockchain interaction.
cargo generate --git https://github.com/klave-network/rust-template evm-light-clientFeatures: Header verification, block synchronization, and on-chain data validation.
Secure wallet functionality for Ethereum-based networks.
cargo generate --git https://github.com/klave-network/rust-template evm-walletFeatures: Non-extractable private keys, multi-network support, and contract deployment.
Ethereum JSON-RPC client for blockchain communication.
cargo generate --git https://github.com/klave-network/rust-template evm-json-rpcFeatures: Standard Ethereum JSON-RPC methods and secure transaction handling.
Multi-signature wallet implementation using MuSig2 protocol.
cargo generate --git https://github.com/klave-network/rust-template musig2Features: Collaborative signing, key aggregation, and secure multi-party signatures.
- Choose a template from the list above
- Generate your project using the cargo generate command
- Navigate to your project directory
- Build locally (optional):
cargo component build --target wasm32-unknown-unknown --release
- Deploy on Klave: Deploy on Klave
All Klave apps are WebAssembly components that:
- Run within Trusted Execution Environments (TEEs)
- Provide cryptographic guarantees of integrity and confidentiality
- Support both queries (read operations) and transactions (write operations)
- Use the WebAssembly Interface Types (WIT) for component interfaces
This template is created by Klave and Secretarium team members, with contributions from:
- Etienne Bosse (@Gosu14) - Klave | Secretarium
- Jeremie Labbe (@jlabbeklavo) - Klave | Secretarium
- Nicolas Marie (@Akhilleus20) - Klave | Secretarium