Skip to content

When embedded in the web, clarify how export/import names convert to JS strings #569

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

Closed
pizlonator opened this issue Feb 29, 2016 · 5 comments
Milestone

Comments

@pizlonator
Copy link
Contributor

When embedded in the web, the exports and imports of a module are represented as JS objects. JS objects are keyed by JS strings, which can be any UCS16 (roughly) sequence. WebAssembly uses sequences of bytes. Therefore, we need to specify conversion rules from WebAssembly byte sequence names to JS strings. There will be JS strings that don't convert gracefully to bytes and vice-versa, so we also need something sensible to happen when the conversion fails.

@titzer
Copy link

titzer commented Feb 29, 2016

SGTM, wanna take a stab at updating Web.md?

@jfbastien
Copy link
Member

Do we want simple failure on the web when conversion fails, or do we want to try to "fix" things? Failure is fine IMO.

@pizlonator
Copy link
Contributor Author

Yup!

-Filip

On Feb 29, 2016, at 11:10 AM, titzer [email protected] wrote:

SGTM, wanna take a stab at updating Web.md?


Reply to this email directly or view it on GitHub #569 (comment).

@pizlonator
Copy link
Contributor Author

I was thinking eager failure at module compile time.

-Filip

On Feb 29, 2016, at 11:20 AM, JF Bastien [email protected] wrote:

Do we want simple failure on the web when conversion fails, or do we want to try to "fix" things? Failure is fine IMO.


Reply to this email directly or view it on GitHub #569 (comment).

@sunfishcode sunfishcode added this to the MVP milestone Mar 4, 2016
jfbastien pushed a commit that referenced this issue Apr 15, 2016
* When embedded in the web, clarify how export/import names convert to JS strings (#569)

* Fixes suggested by @jf

* Address more feedback

Added a link to http://monsur.hossa.in/2012/07/20/utf-8-in-javascript.html.  Simplified the decoding algorithm thanks to Luke's feedback.
rossberg added a commit that referenced this issue Apr 19, 2016
* Prettify section names

* Restructure encoding of function signatures

* Revert "[Binary 11] Update the version number to 0xB."

* Leave index space for growing the number of base types

* Comments addressed

* clarify how export/import names convert to JS strings (#569) (#573)

* When embedded in the web, clarify how export/import names convert to JS strings (#569)

* Fixes suggested by @jf

* Address more feedback

Added a link to http://monsur.hossa.in/2012/07/20/utf-8-in-javascript.html.  Simplified the decoding algorithm thanks to Luke's feedback.

* Access to proprietary APIs apart from HTML5 (#656)

* comments
lukewagner pushed a commit that referenced this issue Apr 28, 2016
* Prettify section names

* Restructure encoding of function signatures

* Revert "[Binary 11] Update the version number to 0xB."

* Leave index space for growing the number of base types

* Comments addressed

* clarify how export/import names convert to JS strings (#569) (#573)

* When embedded in the web, clarify how export/import names convert to JS strings (#569)

* Fixes suggested by @jf

* Address more feedback

Added a link to http://monsur.hossa.in/2012/07/20/utf-8-in-javascript.html.  Simplified the decoding algorithm thanks to Luke's feedback.

* Access to proprietary APIs apart from HTML5 (#656)

* comments
lukewagner added a commit that referenced this issue Apr 29, 2016
* Merge pull request #648 from WebAssembly/current_memory

Add current_memory operator

* Reorder section size field (#639)

* Prettify section names (#638)

* Extensible encoding of function signatures (#640)

* Prettify section names

* Restructure encoding of function signatures

* Revert "[Binary 11] Update the version number to 0xB."

* Leave index space for growing the number of base types

* Comments addressed

* clarify how export/import names convert to JS strings (#569) (#573)

* When embedded in the web, clarify how export/import names convert to JS strings (#569)

* Fixes suggested by @jf

* Address more feedback

Added a link to http://monsur.hossa.in/2012/07/20/utf-8-in-javascript.html.  Simplified the decoding algorithm thanks to Luke's feedback.

* Access to proprietary APIs apart from HTML5 (#656)

* comments

* Merge pull request #641 from WebAssembly/postorder_opcodes

Postorder opcodes

* fix some text that seems to be in the wrong order (#670)

* Clarify that br_table has a branch argument (#664)

* Add explicit argument counts (#672)

* Add explicit arities

* Rename

* Replace uint8 with varint7 in form field (#662)

This needs to be variable-length.
@s3ththompson
Copy link
Member

Fixed in 04c63fb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants