Skip to content

Commit

Permalink
Merge #320
Browse files Browse the repository at this point in the history
320: Add Export and GlobalDescriptor to Runtime API r=syrusakbary a=bjfish

This was mentioned in the issue: #319

It would be nice to be able to iterate exports without requiring `runtime-core`.

Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
  • Loading branch information
bors[bot] and bjfish committed Apr 3, 2019
2 parents 63ab514 + 1ff6ed6 commit 0d8a190
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/runtime-core/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ pub enum Initializer {
GetGlobal(ImportedGlobalIndex),
}

/// Describes the mutability and type of a Global
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq)]
pub struct GlobalDescriptor {
pub mutable: bool,
Expand Down
5 changes: 4 additions & 1 deletion lib/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
//! [`wasmer-clif-backend`]: https://crates.io/crates/wasmer-clif-backend
//! [`compile_with`]: fn.compile_with.html

pub use wasmer_runtime_core::export::Export;
pub use wasmer_runtime_core::global::Global;
pub use wasmer_runtime_core::import::ImportObject;
pub use wasmer_runtime_core::instance::{DynFunc, Instance};
Expand All @@ -95,7 +96,9 @@ pub mod wasm {
//! Various types exposed by the Wasmer Runtime.
pub use wasmer_runtime_core::global::Global;
pub use wasmer_runtime_core::table::Table;
pub use wasmer_runtime_core::types::{FuncSig, MemoryDescriptor, TableDescriptor, Type, Value};
pub use wasmer_runtime_core::types::{
FuncSig, GlobalDescriptor, MemoryDescriptor, TableDescriptor, Type, Value,
};
}

pub mod error {
Expand Down

0 comments on commit 0d8a190

Please sign in to comment.