Skip to content

Conversation

MaxGraey
Copy link
Member

@MaxGraey MaxGraey commented Dec 3, 2019

No description provided.

@MaxGraey
Copy link
Member Author

MaxGraey commented Dec 3, 2019

I preserved wasi_unstable.ts but wasi.ts now redirect to wasi_snapshot.ts. We still need backward compatibility. Also node 13.3.0 it seems implement wasi_unstable version

@MaxGraey MaxGraey changed the title update wasi from unstable to snapshot Add wasi_snapshot and make it default for wasi Dec 3, 2019
@dcodeIO
Copy link
Member

dcodeIO commented Dec 3, 2019

Hmm, bytecodealliance/wasi references a wasi_snapshot_preview1 version. Is there a difference to wasi_snapshot?

@MaxGraey
Copy link
Member Author

MaxGraey commented Dec 3, 2019

It's wasi_snapshot_preview0. Need check which changes introduced in snapshot1...

@MaxGraey
Copy link
Member Author

MaxGraey commented Dec 3, 2019

Ahh, sorry it's snapshot_preview1. So actually latest stable

@dcodeIO
Copy link
Member

dcodeIO commented Dec 4, 2019

I see. Now I'm wondering how we can make this pluggable with a --use option. For instance if there is a wasi program that is intended to run in engines implementing different standards.

Maybe we can do

// bindings/wasi.ts
export * as unstable from "./wasi_unstable.ts";
export * as snapshot_preview1 from "./wasi_snapshot.ts";

and then utilize --use wasi=bindings/wasi/snapshot_preview1 or something like that, with the default being the latest bindings we have?

@MaxGraey
Copy link
Member Author

MaxGraey commented Dec 4, 2019

Or just --use wasi=wasi_snapshot or --use wasi=wasi_unstable

@dcodeIO dcodeIO merged commit 899e97a into AssemblyScript:master Dec 18, 2019
@dcodeIO
Copy link
Member

dcodeIO commented Dec 18, 2019

Thanks! I guess it's fine to look into the mechanism mentioned above later.

@MaxGraey MaxGraey deleted the update-wasi branch December 18, 2019 16:08
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.

2 participants