Go to file
Sameh Abouelsaad cea2d7e655 feat: Refactor kvstore and vault to use features and logging
- Remove hardcoded dependencies in kvstore Cargo.toml; use features
  instead. This allows for more flexible compilation for different
  targets (native vs. WASM).
- Improve logging in vault crate using the `log` crate. This makes
  debugging easier and provides more informative output during
  execution.  Native tests use `env_logger`, WASM tests use
  `console_log`.
- Update README to reflect new logging best practices.
- Add cfg attributes to native and wasm modules to improve clarity.
- Update traits.rs to specify Send + Sync behavior expectations.
2025-05-15 16:42:19 +03:00
docs feat: Refactor kvstore and vault to use features and logging 2025-05-15 16:42:19 +03:00
evm_client feat: Add basic project structure and initial crates 2025-05-13 20:24:29 +03:00
kvstore feat: Refactor kvstore and vault to use features and logging 2025-05-15 16:42:19 +03:00
vault feat: Refactor kvstore and vault to use features and logging 2025-05-15 16:42:19 +03:00
.gitignore feat: Add basic project structure and initial crates 2025-05-13 20:24:29 +03:00
Cargo.toml feat: Add basic project structure and initial crates 2025-05-13 20:24:29 +03:00
README.md Docs: Update roadmap items 2025-05-13 20:27:23 +03:00
vault_crypto_debug.log feat: Refactor kvstore and vault to use features and logging 2025-05-15 16:42:19 +03:00

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

cargo check --workspace --features kvstore/native

WASM (kvstore only)

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

  • Unified async trait for key-value storage
  • Native and WASM backends for kvstore
  • Cryptographic vault with password-protected keyspace
  • EVM client with vault integration
  • CLI and web app targets
  • Full end-to-end integration

License

MIT OR Apache-2.0