From f6fdc50e75c01fac290bdd29ba148245c01aa5e3 Mon Sep 17 00:00:00 2001 From: vms Date: Tue, 29 Dec 2020 13:32:41 +0300 Subject: [PATCH] reexport ast as public --- Cargo.lock | 2 +- wasmer-it/Cargo.toml | 2 +- wasmer-it/src/lib.rs | 7 +++++-- wasmer-it/src/macros.rs | 6 +++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dcab569..a04c4ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -175,7 +175,7 @@ checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] name = "wasmer-interface-types-fl" -version = "0.17.22" +version = "0.17.24" dependencies = [ "fluence-it-types", "it-to-bytes", diff --git a/wasmer-it/Cargo.toml b/wasmer-it/Cargo.toml index 0b6bf20..c75b34b 100644 --- a/wasmer-it/Cargo.toml +++ b/wasmer-it/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-interface-types-fl" -version = "0.17.22" +version = "0.17.24" description = "WebAssembly Interface Types library for Wasmer" license = "MIT" authors = ["The Wasmer Engineering Team "] diff --git a/wasmer-it/src/lib.rs b/wasmer-it/src/lib.rs index 21eb67a..c540a41 100644 --- a/wasmer-it/src/lib.rs +++ b/wasmer-it/src/lib.rs @@ -53,9 +53,9 @@ #![doc(html_favicon_url = "https://wasmer.io/static/icons/favicon.ico")] #![doc(html_logo_url = "https://github.com/wasmerio.png")] -mod ast; +pub mod ast; #[macro_use] -mod macros; +pub mod macros; pub mod decoders; pub mod encoders; pub mod errors; @@ -64,12 +64,15 @@ pub mod interpreter; mod serde; mod values; +// re-exports pub use fluence_it_types::ne_vec::NEVec; pub use fluence_it_types::IRecordFieldType; pub use fluence_it_types::IRecordType; pub use fluence_it_types::IType; pub use fluence_it_types::IValue; +pub use it_to_bytes::ToBytes; + #[cfg(feature = "serde")] pub use crate::serde::de::from_interface_values; diff --git a/wasmer-it/src/macros.rs b/wasmer-it/src/macros.rs index baf976e..897fad7 100644 --- a/wasmer-it/src/macros.rs +++ b/wasmer-it/src/macros.rs @@ -3,7 +3,7 @@ /// This macro creates a `Vec1` by checking at compile-time that its /// invariant holds. #[macro_export] -macro_rules! vec1 { +macro_rules! ne_vec { ($item:expr; 0) => { compile_error!("Cannot create an empty `Vec1`, it violates its invariant.") }; @@ -14,13 +14,13 @@ macro_rules! vec1 { ($item:expr; $length:expr) => { { - crate::vec1::NEVec::new(vec![$item; $length]).unwrap() + fluence_it_types::ne_vec::NEVec::new(vec![$item; $length]).unwrap() } }; ($($item:expr),+ $(,)?) => { { - crate::vec1::NEVec::new(vec![$($item),*]).unwrap() + fluence_it_types::ne_vec::NEVec::new(vec![$($item),*]).unwrap() } }; }