Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

4.2 KB
Raw Blame
[package]
name = "aliasvault-core"
version = "0.32.0"
edition = "2021"
description = "Cross-platform core library for AliasVault"
license = "AGPL-3.0"
repository = "https://github.com/aliasvault/aliasvault"
authors = ["AliasVault"]

[package.metadata.wasm-pack.profile.release]
wasm-opt = false

# Applies to every profile passed via `wasm-pack --profile`, i.e. the browser extension build
[package.metadata.wasm-pack.profile.custom]
wasm-opt = false

[lib]
crate-type = ["lib", "cdylib", "staticlib"]
name = "aliasvault_core"

[features]
default = []
# Feature for UniFFI bindings (Swift/Kotlin) - runtime only, no CLI tools
uniffi = ["dep:uniffi"]
# Feature for UniFFI CLI bindgen tool (only for generating bindings, not for library)
uniffi-cli = ["uniffi/cli"]
# Feature for WASM builds (web app and browser extension)
wasm = ["dep:wasm-bindgen", "dep:serde-wasm-bindgen", "dep:console_error_panic_hook", "dep:js-sys"]

[dependencies]
# Serialization - core dependency for JSON handling
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# Date/time handling: vault timestamps and last-write-wins comparison
chrono = { version = "0.4", default-features = false, features = ["serde", "now", "wasmbind"] }

# Error handling
thiserror = "2"

# SRP (Secure Remote Password) protocol
srp = "0.6"
sha2 = "0.10"
rand = { version = "0.10", features = ["std", "std_rng"] }
num-bigint = "0.4"
subtle = "2.5"
getrandom = { version = "0.4", features = ["wasm_js"] }

# Argon2 password hashing
argon2 = { version = "0.5", features = ["zeroize"] }

# HKDF-SHA256 (SRP/KEK derivation from unlock key)
hkdf = "0.12"

# HMAC-SHA256 (per-manifest blob addresses)
hmac = "0.12"

# SHA-1 (hmac-sha1 TOTP generator)
sha1 = "0.10"

# AES-256-GCM (vault blobs, key wrapping) and RSA-OAEP-SHA256 (manifest key grants)
aes-gcm = "0.10"
rsa = { version = "0.9", features = ["sha2"] }
# ECDSA P-256 (ES256 passkeys)
p256 = { version = "0.14", default-features = false, features = ["alloc", "ecdsa", "getrandom", "pkcs8", "std"] }
rand_core06 = { package = "rand_core", version = "0.6", features = ["getrandom"] }

# Wipes key material from memory on drop
zeroize = { version = "1.8", features = ["derive"] }
# Secret strings: wiped on drop, redacted in Debug, read only via expose_secret()
secrecy = { version = "0.10", features = ["serde"] }

# gzip for the vault_codec packaged format and stored email sources
flate2 = { version = "1.0", default-features = false, features = ["rust_backend"] }

# base64 for keys, ciphertext and blob bytes in JSON transport
base64 = "0.22"

# UniFFI for Swift/Kotlin bindings (optional)
uniffi = { version = "0.32", optional = true }

# WASM bindings (optional)
wasm-bindgen = { version = "0.2", optional = true }
serde-wasm-bindgen = { version = "0.6", optional = true }
js-sys = { version = "0.3", optional = true }
console_error_panic_hook = { version = "0.1", optional = true }

# Parse emails from source
mail-parser = { version = "0.11.6", features = ["full_encoding"] }

# SQLite client which can be used by all host apps for uniform access
rusqlite = { version = "0.40", features = ["bundled", "serialize"] }

# Ed25519 account signing keys
ed25519-dalek = { version = "2", default-features = false, features = ["std", "zeroize"] }

# rsa 0.9 pulls rand 0.8 / getrandom 0.2, which only builds for wasm32-unknown-unknown with its "js" feature.
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom02 = { package = "getrandom", version = "0.2", features = ["js"] }

# Binary for generating Swift/Kotlin bindings
# This binary requires uniffi-cli feature which includes the heavy bindgen dependencies
[[bin]]
name = "uniffi-bindgen"
path = "uniffi-bindgen.rs"
required-features = ["uniffi-cli"]

# Dev profile - fast compilation
[profile.dev]
opt-level = 0
debug = false
incremental = true

# Release profile - optimized for size (web app WASM, fetched on page load)
[profile.release]
opt-level = "z"
lto = "fat"
codegen-units = 1
panic = "abort"
strip = "symbols"

# Browser extension profile - optimized for speed as the WASM ships inside the one time extension download
[profile.extension]
inherits = "release"
opt-level = 3

# Mobile profile - optimized for speed as increased bundle size is less relevant as its a one time download
[profile.mobile]
inherits = "release"
opt-level = 3