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

Fix WASIX additional imports so it works with new threads as well #5116

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Arshia001
Copy link
Member

No description provided.

lib/wasix/src/runtime/mod.rs Outdated Show resolved Hide resolved
lib/wasix/src/state/func_env.rs Outdated Show resolved Hide resolved
@syrusakbary
Copy link
Member

I'd like to review this in more detail before merging

&self,
store: &'a (impl AsStoreRef + ?Sized),
) -> MemoryView<'a> {
pub unsafe fn memory_view<'a>(&self, store: &'a (impl AsStoreRef + ?Sized)) -> MemoryView<'a> {
Copy link
Member

Choose a reason for hiding this comment

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

We can remove this, so the user expect themselves

self.try_inner().map(|i| i.memory())
}

/// Providers safe access to the memory
/// (it must be initialized before it can be used)
/// This has been marked as unsafe as it will panic if its executed
/// on the wrong thread or before the inner is set
pub(crate) unsafe fn memory(&self) -> WasiInstanceGuardMemory<'_> {
pub unsafe fn memory(&self) -> WasiInstanceGuardMemory<'_> {
Copy link
Member

Choose a reason for hiding this comment

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

We can remove this, so the user expect themselves

@Arshia001
Copy link
Member Author

@syrusakbary do you still want to do an in-depth review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants