-
Notifications
You must be signed in to change notification settings - Fork 824
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
Multithreading, full networking and RPC for WebAssembly #3116
Changes from 2 commits
301540c
b7ab85d
3809420
5890423
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,9 @@ pub enum ExportError { | |
/// This error arises when an export is missing | ||
#[error("Missing export {0}")] | ||
Missing(String), | ||
/// This error arises when an export is missing | ||
#[error("Serialization failed {0}")] | ||
SerializationFailed(String), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if I understand when this can be triggered. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah this is leftovers - this is not used anymore - we should remove it |
||
} | ||
|
||
/// Exports is a special kind of map that allows easily unwrapping | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ impl<T> FunctionEnv<T> { | |
} | ||
|
||
/// Get the data as reference | ||
pub fn as_ref<'a>(&self, store: &'a impl AsStoreMut) -> &'a T | ||
pub fn as_ref<'a>(&self, store: &'a impl AsStoreRef) -> &'a T | ||
where | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That could also go to 3.0 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah this is a easy one to bring in |
||
T: Any + Send + 'static + Sized, | ||
{ | ||
|
@@ -112,6 +112,11 @@ impl<T: Send + 'static> FunctionEnvMut<'_, T> { | |
self.func_env.as_mut(&mut self.store_mut) | ||
} | ||
|
||
/// Borrows a new immmutable reference | ||
pub fn as_ref(&self) -> FunctionEnv<T> { | ||
self.func_env.clone() | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And that could go to 3.0 too, I suppose There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah if we move the other ones we might as well |
||
/// Borrows a new mutable reference | ||
pub fn as_mut<'a>(&'a mut self) -> FunctionEnvMut<'a, T> { | ||
FunctionEnvMut { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we will want to do this change in the 3.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i think it would be good to bring this forward - i think this way is cleaner