Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added access to the raw Wasm instance #2724

Merged
merged 1 commit into from
Dec 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/api/src/js/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ impl Instance {
pub fn store(&self) -> &Store {
self.module.store()
}

/// Returns the inner WebAssembly Instance
#[doc(hidden)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this API meant to be publicly usable? In that case it shouldn't be hidden from the documentation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it differs from the SYS API, I rather keep it hidden so people don't rely on it.

Although, we need it for wasmer-js

pub fn raw(&self) -> &WebAssembly::Instance {
&self.instance
}
}

impl fmt::Debug for Instance {
Expand Down