Skip to content

Commit

Permalink
Use metering:: namespace for get_remaining_points/set_remaining_points
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Dec 16, 2020
1 parent ff4a2f3 commit db6e16e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/metering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use wasmer::CompilerConfig;
use wasmer::{imports, wat2wasm, Instance, Module, Store};
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_jit::JIT;
use wasmer_middlewares::{get_remaining_points, set_remaining_points, Metering};
use wasmer_middlewares::metering::{get_remaining_points, set_remaining_points, Metering};

fn main() -> anyhow::Result<()> {
// Let's declare the Wasm module.
Expand Down
4 changes: 3 additions & 1 deletion lib/middlewares/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pub mod metering;

pub use metering::{get_remaining_points, set_remaining_points, Metering};
// The most commonly used symbol are exported at top level of the module. Others are available
// via modules, e.g. `wasmer_middlewares::metering::get_remaining_points`
pub use metering::Metering;

0 comments on commit db6e16e

Please sign in to comment.