Skip to content

Commit

Permalink
chore: update MSRV and Cargo workspace syntax
Browse files Browse the repository at this point in the history
Set MSRV to 1.66 and update Cargo workspace syntax together with
versions in members.  While at it restrict serde dependency in two
non-member crates so that it compiles with Rust 1.66.
  • Loading branch information
mina86 committed Sep 19, 2024
1 parent 7ca2857 commit caf740b
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 9 deletions.
7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ members = [
"borsh-derive",
"borsh-derive-internal",
"borsh-schema-derive-internal",
"fuzz/fuzz-run",
"benchmarks",
]
exclude = [ "fuzz/fuzz-run", "benchmarks" ]

[workspace.metadata.workspaces]
[workspace.package]
# shared version of all public crates in the workspace
version = "0.10.3"
exclude = [ "fuzz/*", "benchmarks" ]
rust-version = "1.66.0"
4 changes: 3 additions & 1 deletion benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ bench = false
rand_xorshift = "0.2.0"
rand = "0.7.0"
borsh = { path = "../borsh", default-features = false }
serde = { version = "1.0", features = ["derive"] }
# Building with serde 1.0.204 breaks due to the use of ‘diagnostic’
# attribute. Remove once MSRV is updated.
serde = { version = "1.0, <1.0.204", features = ["derive"] }
speedy-derive = "0.5"
speedy = "0.5"

Expand Down
3 changes: 2 additions & 1 deletion borsh-derive-internal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "borsh-derive-internal"
version = "0.0.0"
version.workspace = true
rust-version.workspace = true
authors = ["Near Inc <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand Down
3 changes: 2 additions & 1 deletion borsh-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "borsh-derive"
version = "0.0.0"
version.workspace = true
rust-version.workspace = true
authors = ["Near Inc <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand Down
3 changes: 2 additions & 1 deletion borsh-schema-derive-internal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "borsh-schema-derive-internal"
version = "0.0.0"
version.workspace = true
rust-version.workspace = true
authors = ["Near Inc <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand Down
3 changes: 2 additions & 1 deletion borsh/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "borsh"
version = "0.0.0"
version.workspace = true
rust-version.workspace = true
authors = ["Near Inc <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
5 changes: 5 additions & 0 deletions fuzz/fuzz-run/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ path = "src/main.rs"
[dependencies]
honggfuzz = "0.5"
borsh = { path = "../../borsh" }
# This is transitive dependency specified here only to limit the
# version. We need to limit the version because building
# serde 1.0.204 breaks due to the use of ‘diagnostic’ attribute. Drop
# this dependency once MSRV is updated.
serde = "1.0, <1.0.204"

0 comments on commit caf740b

Please sign in to comment.