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

Clarify text format standardization. #65

Closed
wants to merge 3 commits into from
Closed

Conversation

jfbastien
Copy link
Member

No description provided.

@lukewagner
Copy link
Member

I had actually been assuming that we would be standardizing the text format as part of v.1 for several reasons:

  1. we want WebAssembly to be debuggable from day 1 in browsers and this involves choosing how to visualize the text.
  2. we want people to be able to be able to write trivial modules by hand in a text format which they can then compile to a binary that can be loaded directly by the browser

These two use cases are, I think, very important to the "webiness" of WebAssembly. Also, if we don't standardize the text format, then each browser will do its own ad hoc thing as well as 5 ad hoc assemblers and then we'll be in a world of hurt.

@kripken
Copy link
Member

kripken commented May 18, 2015

I agree with @lukewagner. We are not requiring that browsers implement direct support for reading and executing the text format, but it should be standardized so that it is consistent across browsers in view source, as well as in libraries that write some parts in the text format directly ("inline wasm"), and other places etc.

@lukewagner
Copy link
Member

Good point re: inline wasm! I forgot about that.

@jfbastien
Copy link
Member Author

Great points, I'm convinced! I changed the text to hopefully reflect time.

@jfbastien
Copy link
Member Author

Clarified what @lukewagner pointed out. I didn't want to say "will not need to parse" because it still implies that they can parse wasm text to implement the semantics. I'd rather disallow parsing wasm text for anything but tooling.

@abchatra
Copy link

I am bit naïve here. Why do you want to disallow parsing wasm text? It is equivalent to binary format. "Need not parse" should sufficient to not enforce the engines to implement one.

@jfbastien
Copy link
Member Author

It's mainly to prevent divergence between browsers, and prevent developers from shipping the text format when the binary one is what should be shipped.

@lukewagner
Copy link
Member

That makes sense to me; the text doesn't say a browser can't parse the text format for devtools, just as part of the normal web content visible semantics.

@kripken
Copy link
Member

kripken commented May 19, 2015

I agree with @jfbastien's first point, it seems wise to prevent divergence between browsers. If we allow parsing text, and only some browsers do it, that seems risky - sites might be tested on one and fail on another. (On the other hand, I'm not worried about the second point - we shouldn't do this just to prevent people from shipping text by mistake.)

@jfbastien
Copy link
Member Author

@kripken well, if the sole reason for the existence of this format is efficiency then we shouldn't allow developers to inadvertently do the wrong thing.

@kripken
Copy link
Member

kripken commented May 19, 2015

I can see that point, but there are use cases where that efficiently doesn't matter, and the text format might be nice. Such as write some wasm in text, and reload the site, with no build step. But, I think avoiding divergence is a reason to disallow that.

@jfbastien
Copy link
Member Author

Closing in favor of #73 (I rebased instead of merged, git was sad, I need coffee so new PR it is!).

@jfbastien jfbastien closed this May 19, 2015
@jfbastien jfbastien deleted the text-format-std branch May 19, 2015 15: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.

4 participants