Skip to content

Commit

Permalink
MoveResolverExt that depends on TableResolver
Browse files Browse the repository at this point in the history
  • Loading branch information
msmouse authored and aptos-bot committed Apr 7, 2022
1 parent dc9ac7f commit 2074cae
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions aptos-move/aptos-vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ move-binary-format = { git = "https://github.com/diem/move", rev = "3fe033b112ea
move-bytecode-utils = { git = "https://github.com/diem/move", rev = "3fe033b112eae7df2d15ab3467624165ae510caa" }
move-core-types = { git = "https://github.com/diem/move", rev = "3fe033b112eae7df2d15ab3467624165ae510caa", features=["address32"] }
move-stdlib = { git = "https://github.com/diem/move", rev = "3fe033b112eae7df2d15ab3467624165ae510caa" }
move-table-extension = { git = "https://github.com/diem/move", rev = "3fe033b112eae7df2d15ab3467624165ae510caa" }
move-vm-runtime = { git = "https://github.com/diem/move", rev = "3fe033b112eae7df2d15ab3467624165ae510caa" }
move-vm-types = { git = "https://github.com/diem/move", rev = "3fe033b112eae7df2d15ab3467624165ae510caa" }
read-write-set-dynamic = { git = "https://github.com/diem/move", rev = "3fe033b112eae7df2d15ab3467624165ae510caa"}
Expand Down
2 changes: 2 additions & 0 deletions aptos-move/aptos-vm/src/move_vm_ext/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

///! MoveVM and Session wrapped, to make sure Aptos natives and extensions are always installed and
///! taken care of after session finish.
mod resolver;
mod session;
mod vm;

pub use crate::move_vm_ext::{
resolver::MoveResolverExt,
session::{SessionExt, SessionId, SessionOutput},
vm::MoveVmExt,
};
14 changes: 14 additions & 0 deletions aptos-move/aptos-vm/src/move_vm_ext/resolver.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Aptos
// SPDX-License-Identifier: Apache-2.0

use move_core_types::resolver::MoveResolver;
use move_table_extension::TableResolver;
use std::fmt::Debug;

pub trait MoveResolverExt: MoveResolver<Err = Self::ExtError> + TableResolver {
type ExtError: Debug;
}

impl<E: Debug, T: MoveResolver<Err = E> + TableResolver + ?Sized> MoveResolverExt for T {
type ExtError = E;
}

0 comments on commit 2074cae

Please sign in to comment.