From 448b07ef357a43e765e9f9963fdea5fa4ddb9746 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 25 May 2020 10:36:03 +0200 Subject: [PATCH] feat(deprecated) Mimics `units` and `values` module. --- lib/deprecated/runtime-core/src/instance.rs | 2 +- lib/deprecated/runtime-core/src/lib.rs | 24 ++++++++++++--------- lib/deprecated/runtime-core/src/types.rs | 2 -- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/deprecated/runtime-core/src/instance.rs b/lib/deprecated/runtime-core/src/instance.rs index 7f160f7ee..c0691dc51 100644 --- a/lib/deprecated/runtime-core/src/instance.rs +++ b/lib/deprecated/runtime-core/src/instance.rs @@ -1,4 +1,4 @@ -use crate::{new, types::Value}; +use crate::{new, values::Value}; use std::{convert::Infallible, error::Error}; pub struct Instance { diff --git a/lib/deprecated/runtime-core/src/lib.rs b/lib/deprecated/runtime-core/src/lib.rs index d1ca45cdd..aca89e167 100644 --- a/lib/deprecated/runtime-core/src/lib.rs +++ b/lib/deprecated/runtime-core/src/lib.rs @@ -1,21 +1,25 @@ #![allow(deprecated)] -mod functional_api; -pub mod instance; -pub mod module; -pub mod types; -pub mod units; - pub(crate) mod new { pub use wasm_common; pub use wasmer; pub use wasmer_runtime; } -pub use crate::instance::Instance; -pub use crate::module::Module; -pub use functional_api::{compile_with, compile_with_config, validate}; - +mod functional_api; +pub mod instance; pub mod import { pub use crate::new::wasmer::{imports, ImportObject, ImportObjectIterator}; } +pub mod module; +pub mod types; +pub mod units; +pub mod values { + pub use crate::new::wasmer::{Val as Value, ValType as Type}; +} + +pub use crate::instance::Instance; +pub use crate::module::Module; +pub use crate::units::{Bytes, Pages, WASM_MAX_PAGES, WASM_MIN_PAGES, WASM_PAGE_SIZE}; +pub use crate::values::Value; +pub use functional_api::{compile_with, compile_with_config, validate}; diff --git a/lib/deprecated/runtime-core/src/types.rs b/lib/deprecated/runtime-core/src/types.rs index 74b389466..8439546ae 100644 --- a/lib/deprecated/runtime-core/src/types.rs +++ b/lib/deprecated/runtime-core/src/types.rs @@ -1,7 +1,5 @@ use crate::new; -pub use new::wasmer::{Val as Value, ValType as Type}; - pub use new::wasm_common::{ // ExportType as ExportDescriptor,