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

Support for the WASI ABI. #299

Merged
merged 92 commits into from
Apr 4, 2019
Merged

Support for the WASI ABI. #299

merged 92 commits into from
Apr 4, 2019

Conversation

lachlansneff
Copy link
Contributor

@lachlansneff lachlansneff commented Mar 28, 2019

part of #297

@@ -63,7 +63,16 @@ impl Instance {
// Initialize the vm::Ctx in-place after the backing
// has been boxed.
unsafe {
*inner.vmctx = vm::Ctx::new(&mut inner.backing, &mut inner.import_backing, &module)
*inner.vmctx = match imports.call_state_creator() {
Some((data, dtor)) => vm::Ctx::new_with_data(
Copy link
Contributor

Choose a reason for hiding this comment

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

dtor? maybe destructor or finalizer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, either of those is fine. dtor was just short and it's common in the c++ world.

303: Add all wasi types r=lachlansneff a=lachlansneff

This adds all wasi types.

Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>

#[allow(clippy::mut_from_ref)]
fn get_wasi_state(ctx: &Ctx) -> &mut WasiState {
unsafe { &mut *(ctx.data as *mut WasiState) }
Copy link
Contributor

@bjfish bjfish Mar 28, 2019

Choose a reason for hiding this comment

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

One idea: we could differentiate between ModuleState, InstanceState, FunctionState (if we add that).

Mark McCaskey and others added 8 commits March 28, 2019 15:17
304: remove __wasi_ prefix r=lachlansneff a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
305: Feature/fix wasi setup r=lachlansneff a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
@MarkMcCaskey MarkMcCaskey marked this pull request as ready for review April 3, 2019 22:29
Ok(Self {
repo: RepoOpener::new()
.create(true)
.open("mem://foo", "")
Copy link
Contributor

Choose a reason for hiding this comment

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

let's call it something else

lib/wasi/src/syscalls/unix/macos.rs Outdated Show resolved Hide resolved
lib/wasi/src/syscalls/unix/linux.rs Outdated Show resolved Hide resolved
@xmclark
Copy link
Contributor

xmclark commented Apr 4, 2019

bors r+

bors bot added a commit that referenced this pull request Apr 4, 2019
299: Support for the WASI ABI. r=xmclark a=lachlansneff

part of #297 

Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: bors[bot] <bors[bot]@users.noreply.github.com>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
@bors
Copy link
Contributor

bors bot commented Apr 4, 2019

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.

4 participants