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

Cargo bug workaround #1564

Merged
merged 4 commits into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 2 additions & 12 deletions runtime/near-vm-logic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ This crate implements the specification of the interface that Near blockchain ex

[dependencies]
bs58 = "0.3"
sodiumoxide = { version = "0.2.5", optional = true }
serde = { version = "1.0", features = ["derive"] }
near-runtime-fees = { path = "../near-runtime-fees", version = "0.3.1" }
near-vm-errors = { path = "../near-vm-errors", version = "0.3.1" }
Expand All @@ -26,39 +25,30 @@ serde_json = {version= "1.0", features= ["preserve_order"]}
[[test]]
name = "test_storage_read_write"
path = "tests/test_storage_read_write.rs"
required-features = ["mocks"]

[[test]]
name = "test_context"
path = "tests/test_context.rs"
required-features = ["mocks"]

[[test]]
name = "test_miscs"
path = "tests/test_miscs.rs"
required-features = ["mocks"]

[[test]]
name = "test_registers"
path = "tests/test_registers.rs"
required-features = ["mocks"]

[[test]]
name = "test_storage_usage"
path = "tests/test_storage_usage.rs"
required-features = ["mocks"]

[[test]]
name = "test_promises"
path = "tests/test_promises.rs"
required-features = ["mocks"]

[[test]]
name = "test_iterators"
path = "tests/test_iterators.rs"
required-features = ["mocks"]

[features]
default = []
# Mocks include some unsafe code to workaround lifetimes and therefore are optional.
mocks = ["sodiumoxide"]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
sodiumoxide = "0.2.5"
2 changes: 1 addition & 1 deletion runtime/near-vm-logic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod context;
mod dependencies;
mod gas_counter;
mod logic;
#[cfg(feature = "mocks")]
#[cfg(not(target_arch = "wasm32"))]
pub mod mocks;
pub mod serde_with;

Expand Down
2 changes: 1 addition & 1 deletion runtime/near-vm-runner-standalone/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ to make sure it has expected behavior once deployed to the blockchain.
[dependencies]
serde_json = "1.0"
clap = "2.33.0"
near-vm-logic = { path = "../near-vm-logic", features = ["mocks"], version = "0.3.1"}
near-vm-logic = { path = "../near-vm-logic", version = "0.3.1"}
near-vm-runner = { path = "../near-vm-runner", version = "0.3.1" }
1 change: 0 additions & 1 deletion runtime/near-vm-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pwasm-utils = "0.11.0"
parity-wasm = "0.40.1"

[dev-dependencies]
near-vm-logic = { path="../near-vm-logic", features=["mocks"], version = "0.3.0"}
assert_matches = "1.3.0"
wabt = "0.9"
bencher = "0.1.5"
Expand Down