Skip to content

Commit ae4fa9a

Browse files
authored
extract VM trait to it's own crate (#1343)
* extract VM trait to it's own crate * prune vm_api depdendencies * highlight TODO to prune fil_actors_runtime from the vm_api depdency * tracking issue for dropping fil_actors_runtime
1 parent 1b282d4 commit ae4fa9a

35 files changed

+2380
-2216
lines changed

Cargo.lock

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ members = [
5656
"state",
5757
"runtime",
5858
"test_vm",
59+
"vm_api"
5960
]
6061

6162
[workspace.dependencies]
@@ -140,6 +141,7 @@ fil_actor_verifreg = { version = "12.0.0", path = "actors/verifreg" }
140141
fil_actors_evm_shared = { version = "12.0.0", path = "actors/evm/shared" }
141142
fil_actors_runtime = { version = "12.0.0", path = "runtime" }
142143
fil_builtin_actors_state = { version = "12.0.0", path = "state"}
144+
vm_api = { version = "1.0.0", path = "vm_api" }
143145

144146
[patch.crates-io]
145147
#fvm_shared = { git = "https://github.com/filecoin-project/ref-fvm", branch = "master" }

test_vm/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ serde = { workspace = true }
5454
thiserror = { workspace = true }
5555
libsecp256k1 = { workspace = true }
5656
fil_actors_evm_shared = { workspace = true }
57+
vm_api = { workspace = true }
5758

5859
[dev-dependencies]
5960
cid = { workspace = true }

test_vm/src/deals.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use crate::util::{apply_ok, serialize_ok};
2-
use crate::VM;
31
use fil_actor_market::{
42
ClientDealProposal, DealProposal, Label, Method as MarketMethod, PublishStorageDealsParams,
53
PublishStorageDealsReturn,
@@ -15,6 +13,8 @@ use fvm_shared::econ::TokenAmount;
1513
use fvm_shared::error::ExitCode;
1614
use fvm_shared::piece::PaddedPieceSize;
1715
use num_traits::Zero;
16+
use vm_api::util::{apply_ok, serialize_ok};
17+
use vm_api::VM;
1818

1919
#[derive(Clone)]
2020
pub struct DealOptions {

test_vm/src/expects.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use fil_actors_runtime::{
2626
VERIFIED_REGISTRY_ACTOR_ADDR,
2727
};
2828

29-
use crate::trace::ExpectInvocation;
29+
use vm_api::trace::ExpectInvocation;
3030

3131
/// Static helper functions for creating invocation expectations.
3232
pub struct Expect {}

0 commit comments

Comments
 (0)