Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move dependencies into workspace #1955

Merged
merged 8 commits into from
Dec 19, 2023
Merged
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
265 changes: 236 additions & 29 deletions Cargo.lock

Large diffs are not rendered by default.

74 changes: 72 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,88 @@ members = [
"fvm",
"sdk",
"shared",
"ipld/*",
"ipld/amt/fuzz",
"ipld/hamt/fuzz",
"ipld/kamt/fuzz",
"testing/calibration/shared",
"testing/conformance",
"testing/common_fuzz",
"testing/common_fuzz/fuzz",
"testing/integration",
"testing/calibration/shared",
"ipld/*",
"testing/test_actors",
"testing/test_actors/actors/*",
"tools/fvm-bench",
]

[workspace.package]
version = "4.0.0"
license = "MIT OR Apache-2.0"
edition = "2021"
repository = "https://github.com/filecoin-project/ref-fvm"
authors = ["Protocol Labs", "Filecoin Core Devs"]

[workspace.dependencies]
# common
serde = { version = "1.0.164", default-features = false, features = ["derive"] }
thiserror = "1.0.40"
anyhow = "1.0.71"
rand = "0.8.5"
rand_chacha = "0.3.0"
serde_json = "1.0.99"
serde_tuple = "0.5.0"
byteorder = "1.4.3"
hex = "0.4.3"
num-traits = { version = "0.2.14", default-features = false }
num-derive = "0.4.0"
lazy_static = "1.4.0"
log = "0.4.19"
futures = "0.3.28"

# IPLD/Encoding
cid = { version = "0.10.1", default-features = false }
multihash = { version = "0.18.1", default-features = false }
libipld = { version = "0.16.0", features = ["serde-codec"] }
libipld-core = { version = "0.16.0", features = ["serde-codec"] }

# crypto
blake2b_simd = "1.0.1"
libsecp256k1 = { version = "0.7.1" }
bls-signatures = { version = "0.15", default-features = false }

# wasmtime
wasmtime = {version = "12.0.2", default-features = false, features = ["cranelift", "pooling-allocator", "parallel-compilation"] }
wasmtime-environ = "12.0.2"
wasmtime-runtime = { version = "12.0.2", default-features = false }

# misc
libfuzzer-sys = "0.4"
arbitrary = "1.3.0"
ahash = "0.8.3"
itertools = "0.11.0"
once_cell = "1.18.0"
unsigned-varint = "0.7.2"

# dev/tools/tests
criterion = "0.5.1"
quickcheck = "1.0.0"
quickcheck_macros = "1.0.0"
minstant = "0.1.3"

# workspace
fvm = { path = "fvm", default-features = false }
fvm_shared = { path = "shared", default-features = false }
fvm_sdk = { path = "sdk" }
fvm_ipld_amt = { path = "ipld/amt" }
fvm_ipld_hamt = { path = "ipld/hamt" }
fvm_ipld_kamt = { path = "ipld/kamt" }
fvm_ipld_car = { path = "ipld/car" }
fvm_ipld_blockstore = { path = "ipld/blockstore" }
fvm_ipld_bitfield = { path = "ipld/bitfield" }
fvm_ipld_encoding = { path = "ipld/encoding" }
fvm_gas_calibration_shared = { path = "testing/calibration/shared" }
fvm_integration_tests = { path = "testing/integration" }
fvm_test_actors = { path = "testing/test_actors" }

[profile.actor]
inherits = "release"
Expand Down
63 changes: 27 additions & 36 deletions fvm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,63 +1,54 @@
[package]
name = "fvm"
description = "Filecoin Virtual Machine reference implementation"
version = "4.0.0"
license = "MIT OR Apache-2.0"
version.workspace = true
license.workspace = true
edition.workspace = true
repository.workspace = true
authors = ["Protocol Labs", "Filecoin Core Devs"]
edition = "2021"
repository = "https://github.com/filecoin-project/ref-fvm"
keywords = ["filecoin", "web3", "wasm"]

[lib]
crate-type = ["lib"]

[dependencies]
anyhow = { version = "1.0.71", features = ["backtrace"] }
thiserror = "1.0.40"
num-traits = "0.2"
anyhow = { workspace = true, features = ["backtrace"] }
thiserror = { workspace = true }
num-traits = { workspace = true }
cid = { workspace = true, features = ["serde-codec"] }
multihash = { workspace = true, features = ["sha2", "sha3", "ripemd"] }
fvm_shared = { version = "4.0.0", path = "../shared", features = ["crypto"] }
fvm_ipld_hamt = { version = "0.9.0", path = "../ipld/hamt" }
fvm_ipld_amt = { version = "0.6.2", path = "../ipld/amt" }
fvm_ipld_blockstore = { version = "0.2.0", path = "../ipld/blockstore" }
fvm_ipld_encoding = { version = "0.4.0", path = "../ipld/encoding" }
serde = { version = "1.0", features = ["derive"] }
serde_tuple = "0.5"
lazy_static = "1.4.0"
fvm_shared = { workspace = true, features = ["crypto"] }
fvm_ipld_hamt = { workspace = true }
fvm_ipld_amt = { workspace = true }
fvm_ipld_blockstore = { workspace = true }
fvm_ipld_encoding = { workspace = true }
wasmtime = { workspace = true }
wasmtime-environ = { workspace = true }
wasmtime-runtime = { workspace = true }
serde = { workspace = true }
serde_tuple = { workspace = true }
lazy_static = { workspace = true }
log = { workspace = true }
arbitrary = { workspace = true, optional = true, features = ["derive"] }
rand = { workspace = true }
quickcheck = { workspace = true, optional = true }
once_cell = { workspace = true }
minstant = { workspace = true }
blake2b_simd = { workspace = true }
byteorder = { workspace = true }
derive_more = "0.99.17"
replace_with = "0.1.7"
filecoin-proofs-api = { version = "16", default-features = false }
rayon = "1"
num_cpus = "1.15.0"
log = "0.4.19"
fvm-wasm-instrument = "0.4.0"
yastl = "0.1.2"
arbitrary = { version = "1.3.0", optional = true, features = ["derive"] }
rand = "0.8.5"
quickcheck = { version = "1", optional = true }
once_cell = "1.18"
minstant = "0.1.2"
blake2b_simd = "1.0.0"
byteorder = "1.4.3"
static_assertions = "1.1.0"
ambassador = "0.3.5"

[dev-dependencies]
pretty_assertions = "1.3.0"
fvm = { path = ".", features = ["testing"], default-features = false }

[dependencies.wasmtime]
version = "12.0.2"
default-features = false
features = ["cranelift", "pooling-allocator", "parallel-compilation"]

[dependencies.wasmtime-environ]
version = "12.0.1"

[dependencies.wasmtime-runtime]
version = "12.0.1"
default-features = false
fvm = { workspace = true, features = ["testing"], default-features = false }
Stebalien marked this conversation as resolved.
Show resolved Hide resolved

[features]
default = ["opencl"]
Expand Down
20 changes: 10 additions & 10 deletions ipld/amt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ repository = "https://github.com/filecoin-project/ref-fvm"

[dependencies]
cid = { workspace = true, features = ["serde-codec"] }
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
once_cell = "1.18"
itertools = "0.11"
anyhow = "1.0.71"
fvm_ipld_blockstore = { version = "0.2", path = "../blockstore" }
fvm_ipld_encoding = { version = "0.4", path = "../encoding" }
serde = { workspace = true, features = ["derive"] }
thiserror = { workspace = true }
once_cell = { workspace = true }
itertools = { workspace = true }
anyhow = { workspace = true }
fvm_ipld_blockstore = { workspace = true }
fvm_ipld_encoding = { workspace = true }

[dev-dependencies]
criterion = "0.5.1"
quickcheck = "1"
quickcheck_macros = "1"
criterion = { workspace = true }
quickcheck = { workspace = true }
quickcheck_macros = { workspace = true }

[[bench]]
name = "amt_benchmark"
Expand Down
19 changes: 6 additions & 13 deletions ipld/amt/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,14 @@ edition = "2021"
cargo-fuzz = true

[dependencies]
libfuzzer-sys = "0.4"
arbitrary = { version = "1.1", features = ["derive"] }
ahash = "0.7.6"
itertools = "0.10.3"
libfuzzer-sys = { workspace = true }
arbitrary = { workspace = true, features = ["derive"] }
ahash = { workspace = true }
itertools = { workspace = true }

cid = { workspace = true, features = ["serde-codec", "arb", "std"] }
fvm_ipld_amt = { path = ".."}
fvm_ipld_blockstore = { path = "../../blockstore" }

# Prevent this from interfering with workspaces
[workspace]
members = ["."]

[workspace.dependencies]
cid = "0.10.1"
fvm_ipld_amt = { workspace = true }
fvm_ipld_blockstore = { workspace = true }

[[bin]]
name = "equivalence"
Expand Down
16 changes: 8 additions & 8 deletions ipld/bitfield/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ edition = "2021"
repository = "https://github.com/filecoin-project/ref-fvm"

[dependencies]
unsigned-varint = "0.7.1"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0.40"
arbitrary = { version = "1.3.0", optional = true}
fvm_ipld_encoding = { version = "0.4", path = "../encoding" }
unsigned-varint = { workspace = true }
serde = { workspace = true }
thiserror = { workspace = true }
arbitrary = { workspace = true, optional = true}
fvm_ipld_encoding = { workspace = true }

[dev-dependencies]
rand = { workspace = true }
criterion = { workspace = true }
serde_json = { workspace = true }
rand_xorshift = "0.3.0"
rand = "0.8.5"
criterion = "0.5"
serde_json = "1.0"
gperftools = "0.2.0"

[features]
Expand Down
2 changes: 1 addition & 1 deletion ipld/blockstore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository = "https://github.com/filecoin-project/ref-fvm"

[dependencies]
cid = { workspace = true, features = ["serde-codec", "std"] }
anyhow = "1.0.71"
anyhow = { workspace = true }
# multihash is also re-exported by `cid`. Having `multihash` here as a
# depdendency is needed to enable the features of the re-export.
multihash = { workspace = true, features = ["multihash-impl"] }
Expand Down
12 changes: 6 additions & 6 deletions ipld/car/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ repository = "https://github.com/filecoin-project/ref-fvm"

[dependencies]
cid = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
futures = "0.3.28"
fvm_ipld_blockstore = { version = "0.2", path = "../blockstore" }
fvm_ipld_encoding = { version = "0.4", path = "../encoding" }
unsigned-varint = { version = "0.7.2", features = ["futures"] }
serde = { workspace = true }
thiserror = { workspace = true }
unsigned-varint = { workspace = true, features = ["futures"] }
fvm_ipld_blockstore = { workspace = true }
fvm_ipld_encoding = { workspace = true }
futures = { workspace = true }

[dev-dependencies]
async-std = { version = "1.12", features = ["attributes"] }
16 changes: 8 additions & 8 deletions ipld/encoding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ edition = "2021"
repository = "https://github.com/filecoin-project/ref-fvm"

[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_ipld_dagcbor = "0.4.0"
serde_tuple = "0.5"
serde_repr = "0.1"
serde = { workspace = true }
serde_tuple = { workspace = true }
cid = { workspace = true, features = ["serde-codec", "std"] }
thiserror = "1.0"
anyhow = "1.0.71"
fvm_ipld_blockstore = { version = "0.2", path = "../blockstore" }
thiserror = { workspace = true }
anyhow = { workspace = true }
fvm_ipld_blockstore = { workspace = true }
# multihash is also re-exported by `cid`. Having `multihash` here as a
# depdendency is needed to enable the features of the re-export.
multihash = { workspace = true, features = ["blake2b", "multihash-impl"] }
serde_ipld_dagcbor = "0.4.0"
serde_repr = "0.1"

[features]
default = []

[dev-dependencies]
serde_json = "1.0.99"
serde_json = { workspace = true }
29 changes: 15 additions & 14 deletions ipld/hamt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,30 @@ edition = "2021"
repository = "https://github.com/filecoin-project/ref-fvm"

[dependencies]
serde = { version = "1.0", features = ["derive"] }
byteorder = "1.4.3"
serde = { workspace = true }
byteorder = { workspace = true }
cid = { workspace = true, features = ["serde-codec"] }
multihash = { workspace = true }
thiserror = "1.0"
thiserror = { workspace = true }
once_cell = { workspace = true }
anyhow = { workspace = true }
fvm_ipld_encoding = { workspace = true }
fvm_ipld_blockstore = { workspace = true }
sha2 = "0.10"
once_cell = "1.18"
forest_hash_utils = "0.1"
anyhow = "1.0.71"
libipld-core = { version = "0.16.0", features = ["serde-codec"] }
fvm_ipld_encoding = { version = "0.4", path = "../encoding" }
fvm_ipld_blockstore = { version = "0.2", path = "../blockstore" }
libipld-core = { workspace = true }


[features]
identity = []

[dev-dependencies]
hex = "0.4.3"
criterion = "0.5.1"
unsigned-varint = "0.7"
quickcheck = "1"
quickcheck_macros = "1"
rand = "0.8.5"
hex = { workspace = true }
criterion = { workspace = true }
unsigned-varint = { workspace = true }
quickcheck = { workspace = true }
quickcheck_macros = { workspace = true }
rand = { workspace = true }

[[bench]]
name = "hamt_beckmark"
Expand Down
17 changes: 6 additions & 11 deletions ipld/hamt/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,15 @@ edition = "2021"
cargo-fuzz = true

[dependencies]
libfuzzer-sys = "0.4"
arbitrary = { version = "1.1", features = ["derive"] }
ahash = "0.7.6"
libfuzzer-sys = { workspace = true }
arbitrary = { workspace = true, features = ["derive"] }
ahash = { workspace = true }

fvm_ipld_hamt = { path = ".." }
fvm_ipld_blockstore = { path = "../../blockstore" }


# Prevent this from interfering with workspaces
[workspace]
members = ["."]
Comment on lines -21 to -22
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah.... I think this may have been why we didn't include this in the workspace. We need to check the cargo tree (and enabled features) in the workspace itself to make sure we're not "unifying" them. I'll go ahead and do that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, look up "feature unification in rust" if you want to have bad dreams.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. Actually... this seems fine? I thought I saw the arbitrary feature/crates getting included in the main dependency tree... but now I'm not seeing that.

fvm_ipld_hamt = { workspace = true }
fvm_ipld_blockstore = { workspace = true }

[[bin]]
name = "simple"
name = "hamt-simple"
path = "fuzz_targets/simple.rs"
test = false
doc = false
Expand Down
Loading
Loading