-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
A la the libextism sdk.
Given that process.env
isn't evenly supported across all targets – browsers don't have an environment! – it might be best to integrate this flag in the InternalConfig
interface and populate it during config normalization. We can implement that with process.env
, then compile it out to false
in the browser builds (here and here)
That flag will need to be threaded through to the loadWasi
call, and then through to the polyfills:
./src/polyfills/node-wasi.ts
: I think Node currently defaults to stdout being enabled via wasi – so in this case we'd want to gate that on whether or not the env flag is set../src/polyfills/deno-wasi.ts
: You'll have to play with this one a bit – the docs are a bit spare. Notably, Deno deprecated and removed WASI in later versions, so if this takes too much work, don't sweat it – we'll want to look into a replacement in the near future in any case../src/polyfills/browser-wasi.ts
: If the flag is enabled, we can replace these lines with something like this example.
I'd be happy to pair on this, too! This would be a great way to get your fingerprints on the js-sdk.
Metadata
Metadata
Assignees
Labels
No labels