feat: Add basic project structure and initial crates
- Added basic project structure with workspace and crates: `kvstore`, `vault`, `evm_client`, `cli_app`, `web_app`. - Created initial `Cargo.toml` files for each crate. - Added placeholder implementations for key components. - Included initial documentation files (`README.md`, architecture docs, repo structure). - Included initial implementaion for kvstore crate(async API, backend abstraction, separation of concerns, WASM/native support, testability) - Included native and browser tests for the kvstore crate
This commit is contained in:
57
README.md
Normal file
57
README.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Modular Rust System: Key-Value Store, Vault, and EVM Client
|
||||
|
||||
This repository implements a modular, async, and cross-platform cryptographic stack in Rust. It is designed for use in both native (desktop/server) and WASM (browser) environments, supporting secure storage, cryptographic operations, and EVM (Ethereum) client functionality.
|
||||
|
||||
## Crate Overview
|
||||
|
||||
- **kvstore/**: Async key-value store trait and implementations (native: `sled`, WASM: IndexedDB).
|
||||
- **vault/**: Cryptographic vault for managing encrypted keyspaces and key operations. Uses `kvstore` for persistence.
|
||||
- **evm_client/**: EVM RPC client, integrates with `vault` for signing and secure key management.
|
||||
- **cli_app/**: (Planned) Command-line interface for scripting and automation.
|
||||
- **web_app/**: (Planned) WASM web app exposing the same APIs to JavaScript or browser scripting.
|
||||
|
||||
## Architecture Highlights
|
||||
- **Async everywhere:** All APIs are async and runtime-agnostic.
|
||||
- **Conditional backends:** Uses Cargo features and `cfg` to select the appropriate backend for each environment.
|
||||
- **Secure by design:** Vault encrypts all key material at rest and leverages modern cryptography.
|
||||
- **Tested natively and in browser:** WASM and native backends are both covered by tests.
|
||||
|
||||
## Building and Testing
|
||||
|
||||
### Prerequisites
|
||||
- Rust (latest stable recommended)
|
||||
- For WASM: `wasm-pack`, Firefox or Chrome (for browser tests)
|
||||
|
||||
### Native
|
||||
```sh
|
||||
cargo check --workspace --features kvstore/native
|
||||
```
|
||||
|
||||
### WASM (kvstore only)
|
||||
```sh
|
||||
cd kvstore
|
||||
wasm-pack test --headless --firefox --features web
|
||||
```
|
||||
|
||||
## Directory Structure
|
||||
```
|
||||
.
|
||||
├── kvstore/ # Key-value store trait and backends
|
||||
├── vault/ # Cryptographic vault
|
||||
├── evm_client/ # EVM RPC client
|
||||
├── cli_app/ # CLI (planned)
|
||||
├── web_app/ # Web app (planned)
|
||||
├── docs/ # Architecture docs
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## Roadmap
|
||||
- [x] Unified async trait for key-value storage
|
||||
- [x] Native and WASM backends for kvstore
|
||||
- [x] Cryptographic vault with password-protected keyspace
|
||||
- [x] EVM client with vault integration
|
||||
- [ ] CLI and web app targets
|
||||
- [ ] Full end-to-end integration
|
||||
|
||||
## License
|
||||
MIT OR Apache-2.0
|
||||
Reference in New Issue
Block a user