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

WebAssembly global is not mentioned in documentation #23334

Closed
styfle opened this issue Oct 8, 2018 · 10 comments
Closed

WebAssembly global is not mentioned in documentation #23334

styfle opened this issue Oct 8, 2018 · 10 comments
Labels
doc Issues and PRs related to the documentations. wasm Issues and PRs related to WebAssembly.

Comments

@styfle
Copy link
Member

styfle commented Oct 8, 2018

  • Version: 10.11.0
  • Platform: all
  • Subsystem: docs

It looks like the WebAssembly global is available but there is no mention in the docs of when this was introduced and which features are available.

Example usage: https://glot.io/snippets/f5j3smuum8

Should WebAssembly be added to the globals page or maybe even add a separate page?

@jasnell
Copy link
Member

jasnell commented Oct 8, 2018

I think listing it in globals.md is good for now. We should likely have a dedicated page in the docs for it eventually tho.

@jasnell jasnell added doc Issues and PRs related to the documentations. wasm Issues and PRs related to WebAssembly. labels Oct 8, 2018
@Trott
Copy link
Member

Trott commented Oct 8, 2018

@nodejs/documentation

@devsnek
Copy link
Member

devsnek commented Oct 8, 2018

we should just link to the mdn docs for it from globals.md

@styfle
Copy link
Member Author

styfle commented Oct 8, 2018

@devsnek Is the API 100% compatible? What about the streaming APIs such as WebAssembly.instantiateStreaming?

@thefourtheye
Copy link
Contributor

This is perhaps good-first-contribution worthy?

@devsnek
Copy link
Member

devsnek commented Oct 8, 2018

@styfle assuming we were to enable streaming compilation it would work. node and chrome use the same implementation from V8.

@styfle
Copy link
Member Author

styfle commented Oct 8, 2018

@devsnek From a quick test (and from the sound of your comment) the streaming compilation is not ready so the docs should make this clear. If/when that feature is enabled, then it can be added to the docs and the version can reflect when that shipped.

Speaking of which, at what version was the WebAssembly global added?

@Trott
Copy link
Member

Trott commented Oct 8, 2018

Speaking of which, at what version was the WebAssembly global added?

@styfle A quick test suggests it was 8.0.0.

$ node -v
v7.10.1
$ node -p 'typeof WebAssembly'
undefined
$ nvm use 8.0.0
Now using node v8.0.0 (npm v5.0.2)
$ node -p 'typeof WebAssembly'
object
$ 

@styfle
Copy link
Member Author

styfle commented Oct 8, 2018

@Trott Nice! That matches the MDN compatibility table.
https://developer.mozilla.org/en-US/docs/WebAssembly#Browser_compatibility

I will create a PR to get this added to the globals and probably include a link to the MDN docs 👍

@styfle
Copy link
Member Author

styfle commented Oct 8, 2018

I created PR #23339

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. wasm Issues and PRs related to WebAssembly.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants