-
Notifications
You must be signed in to change notification settings - Fork 22
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
adds stubwasi.rs #111
adds stubwasi.rs #111
Conversation
if stub_wasi { | ||
add_wasi_imports(module, &mut wasi_imports)?; | ||
} |
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.
i moved this inside the if stub_wasi block below, since looping through the libraries to add libraries is done (again?) there
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.
Thanks for this! LGTM, except seem my comment about the unwrap
s.
fn add_wasi_imports<'a>( | ||
module: &'a [u8], | ||
imports: &mut HashMap<&'a str, HashMap<&'a str, FuncType>>, | ||
) -> Result<()> { |
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.
i'm confused why Result<(), Error> is not required here
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.
We're use
ing anyhow::Result
, the second generic parameter of which has a default of anyhow::Error
, so it doesn't need to be specified explicitly.
factors wasi stubbing out of lib.rs into a new file