Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ keywords = ["bitwarden"]

# Define dependencies that are expected to be consistent across all crates
[workspace.dependencies]

# External crates that are expected to maintain a consistent version across all crates
async-trait = ">=0.1.80, <0.2"
bitwarden = { path = "crates/bitwarden", version = "=1.0.0" }
bitwarden-api-api = { path = "crates/bitwarden-api-api", version = "=1.0.0" }
bitwarden-api-identity = { path = "crates/bitwarden-api-identity", version = "=1.0.0" }
Expand All @@ -43,9 +46,6 @@ bitwarden-uniffi-error = { path = "crates/bitwarden-uniffi-error", version = "=1
bitwarden-uuid = { path = "crates/bitwarden-uuid", version = "=1.0.0" }
bitwarden-uuid-macro = { path = "crates/bitwarden-uuid-macro", version = "=1.0.0" }
bitwarden-vault = { path = "crates/bitwarden-vault", version = "=1.0.0" }

# External crates that are expected to maintain a consistent version across all crates
async-trait = ">=0.1.80, <0.2"
chrono = { version = ">=0.4.26, <0.5", features = [
"clock",
"serde",
Expand All @@ -63,11 +63,11 @@ reqwest = { version = ">=0.12.5, <0.13", features = [
], default-features = false }
schemars = { version = ">=1.0.0, <2.0", features = ["uuid1", "chrono04"] }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde-wasm-bindgen = ">=0.6.0, <0.7"
serde_bytes = { version = ">=0.11.17, <0.12.0" }
serde_json = ">=1.0.96, <2.0"
serde_qs = ">=0.12.0, <0.16"
serde_repr = ">=0.1.12, <0.2"
serde-wasm-bindgen = ">=0.6.0, <0.7"
syn = ">=2.0.87, <3"
thiserror = ">=1.0.40, <3"
tokio = { version = "1.36.0", features = ["macros"] }
Expand All @@ -82,12 +82,6 @@ wasm-bindgen-futures = "0.4.41"
wasm-bindgen-test = "0.3.45"
wiremock = ">=0.6.0, <0.7"

# There is an incompatibility when using pkcs5 and chacha20 on wasm builds. This can be removed once a new
# rustcrypto-formats crate version is released since the fix has been upstreamed.
# https://github.com/RustCrypto/formats/pull/1625
[patch.crates-io]
pkcs5 = { git = "https://github.com/bitwarden/rustcrypto-formats.git", rev = "2b27c63034217dd126bbf5ed874da51b84f8c705" }

[workspace.lints.clippy]
unused_async = "deny"
unwrap_used = "deny"
Expand All @@ -96,17 +90,23 @@ string_slice = "warn"
[workspace.lints.rust]
missing_docs = "warn"

# Compile all dependencies with some optimizations when building this crate on debug
# This slows down clean builds by about 50%, but the resulting binaries can be orders of magnitude faster
# As clean builds won't occur very often, this won't slow down the development process
[profile.dev.package."*"]
opt-level = 2
# There is an incompatibility when using pkcs5 and chacha20 on wasm builds. This can be removed once a new
# rustcrypto-formats crate version is released since the fix has been upstreamed.
# https://github.com/RustCrypto/formats/pull/1625
[patch.crates-io]
pkcs5 = { git = "https://github.com/bitwarden/rustcrypto-formats.git", rev = "2b27c63034217dd126bbf5ed874da51b84f8c705" }

# Turn on a small amount of optimisation in development mode. This might interfere when trying to use a debugger
# if the compiler decides to optimize some code away, if that's the case, it can be set to 0 or commented out
[profile.dev]
opt-level = 1

# Compile all dependencies with some optimizations when building this crate on debug
# This slows down clean builds by about 50%, but the resulting binaries can be orders of magnitude faster
# As clean builds won't occur very often, this won't slow down the development process
[profile.dev.package."*"]
opt-level = 2

# Turn on LTO on release mode
[profile.release]
codegen-units = 1
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-auth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ wasm = [
"bitwarden-core/wasm",
"dep:tsify",
"dep:wasm-bindgen",
"dep:wasm-bindgen-futures"
"dep:wasm-bindgen-futures",
] # WASM support

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-collections/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords.workspace = true
uniffi = [
"bitwarden-core/uniffi",
"bitwarden-crypto/uniffi",
"dep:uniffi"
"dep:uniffi",
] # Uniffi bindings
wasm = ["bitwarden-core/wasm", "dep:tsify", "dep:wasm-bindgen"] # WASM support

Expand Down
4 changes: 2 additions & 2 deletions crates/bitwarden-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ keywords.workspace = true
[features]
internal = ["dep:zxcvbn"]
no-memory-hardening = [
"bitwarden-crypto/no-memory-hardening"
"bitwarden-crypto/no-memory-hardening",
] # Disable memory hardening features
secrets = [] # Secrets manager API
uniffi = [
Expand All @@ -29,7 +29,7 @@ wasm = [
"bitwarden-error/wasm",
"dep:wasm-bindgen",
"dep:wasm-bindgen-futures",
"dep:tsify"
"dep:tsify",
] # WASM support

[dependencies]
Expand Down
12 changes: 6 additions & 6 deletions crates/bitwarden-error-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ repository.workspace = true
license-file.workspace = true
keywords.workspace = true

[lib]
proc-macro = true

[features]
wasm = []

Expand All @@ -23,16 +26,13 @@ proc-macro2 = { workspace = true }
quote = { workspace = true }
syn = { workspace = true }

[lints]
workspace = true

[lib]
proc-macro = true

[dev-dependencies]
bitwarden-error = { workspace = true, features = ["wasm"] }
js-sys.workspace = true
serde.workspace = true
thiserror.workspace = true
tsify.workspace = true
wasm-bindgen.workspace = true

[lints]
workspace = true
8 changes: 4 additions & 4 deletions crates/bitwarden-error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ wasm = [
"bitwarden-error-macro/wasm",
"dep:js-sys",
"dep:tsify",
"dep:wasm-bindgen"
"dep:wasm-bindgen",
]

[dependencies]
Expand All @@ -28,10 +28,10 @@ js-sys = { workspace = true, optional = true }
tsify = { workspace = true, optional = true }
wasm-bindgen = { workspace = true, optional = true }

[lints]
workspace = true

[dev-dependencies]
serde.workspace = true
trybuild = "1.0.101"
wasm-bindgen-test = { workspace = true }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/bitwarden-exporters/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ wasm = [
"bitwarden-collections/wasm",
"bitwarden-vault/wasm",
"dep:tsify",
"dep:wasm-bindgen"
"dep:wasm-bindgen",
] # WebAssembly bindings

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-generators/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ uniffi = ["dep:uniffi"] # Uniffi bindings
wasm = [
"bitwarden-core/wasm",
"dep:tsify",
"dep:wasm-bindgen"
"dep:wasm-bindgen",
] # WebAssembly bindings

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-ipc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ wasm = [
"dep:wasm-bindgen-futures",
"dep:js-sys",
"bitwarden-error/wasm",
"bitwarden-threading/wasm"
"bitwarden-threading/wasm",
] # WASM support

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-send/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ keywords.workspace = true
uniffi = [
"bitwarden-core/uniffi",
"bitwarden-crypto/uniffi",
"dep:uniffi"
"dep:uniffi",
] # Uniffi bindings

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-ssh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ keywords.workspace = true
wasm = [
"bitwarden-error/wasm",
"dep:tsify",
"dep:wasm-bindgen"
"dep:wasm-bindgen",
] # WASM support
uniffi = ["dep:uniffi"] # Uniffi bindings

Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-threading/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ wasm = [
"dep:wasm-bindgen",
"dep:wasm-bindgen-futures",
"dep:js-sys",
"dep:gloo-timers"
"dep:gloo-timers",
]

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions crates/bitwarden-uniffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ repository.workspace = true
license-file.workspace = true
keywords.workspace = true

[features]

[lib]
crate-type = ["lib", "staticlib", "cdylib"]
bench = false

[features]

[dependencies]
async-trait = { workspace = true }
bitwarden-collections = { workspace = true, features = ["uniffi"] }
Expand Down
6 changes: 3 additions & 3 deletions crates/bitwarden-uuid-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ repository.workspace = true
license-file.workspace = true
keywords.workspace = true

[lib]
proc-macro = true

[dependencies]
quote = { workspace = true }
syn = { workspace = true }

[lints]
workspace = true

[lib]
proc-macro = true
6 changes: 3 additions & 3 deletions crates/bitwarden-uuid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ keywords.workspace = true
[dependencies]
bitwarden-uuid-macro = { workspace = true }

[lints]
workspace = true

[dev-dependencies]
serde = { workspace = true }
serde-wasm-bindgen = { workspace = true }
serde_json = { workspace = true }
uuid = { workspace = true }
wasm-bindgen-test = { workspace = true }

[lints]
workspace = true
6 changes: 4 additions & 2 deletions crates/bitwarden-vault/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ keywords.workspace = true
uniffi = [
"bitwarden-core/uniffi",
"bitwarden-crypto/uniffi",
"dep:uniffi"
"dep:uniffi",
] # Uniffi bindings
wasm = [
"bitwarden-collections/wasm",
"bitwarden-core/wasm",
"bitwarden-encoding/wasm",
"dep:tsify",
"dep:wasm-bindgen",
"dep:wasm-bindgen-futures"
"dep:wasm-bindgen-futures",
] # WASM support

[dependencies]
Expand All @@ -43,6 +43,7 @@ chrono = { workspace = true }
data-encoding = { workspace = true }
hmac = ">=0.12.1, <0.13"
percent-encoding = ">=2.1, <3.0"
psl = "~2.1.135"
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
Expand All @@ -52,6 +53,7 @@ sha2 = ">=0.10.6, <0.11"
thiserror = { workspace = true }
tsify = { workspace = true, optional = true }
uniffi = { workspace = true, optional = true }
url = "~2.5.7"
uuid = { workspace = true }
wasm-bindgen = { workspace = true, optional = true }
wasm-bindgen-futures = { workspace = true, optional = true }
Expand Down
Loading
Loading