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

wasm.wast should be named wasm.wat #53

Closed
sunfishcode opened this issue Feb 13, 2018 · 6 comments
Closed

wasm.wast should be named wasm.wat #53

sunfishcode opened this issue Feb 13, 2018 · 6 comments

Comments

@sunfishcode
Copy link

The file wasm.wast was added in #50.

".wast" is the extension for WebAssembly test files, which contain a superset of the wasm text format.

".wat" is the extension for the plain WebAssembly text format.

See http://webassembly.org/docs/text-format/ for details.

@dcodeIO
Copy link
Owner

dcodeIO commented Feb 13, 2018

It's actually Binaryen-flavored s-expression syntax. Does that still qualify as .wat? I always had the impression that .wat is linear stack-syntax and .wast pretty much everything else.

@sunfishcode
Copy link
Author

It's not binaryen-specific; wabt and the spec interpreter both accept this form.

@dcodeIO
Copy link
Owner

dcodeIO commented Feb 13, 2018

I see. So, it's safe to assume that S-expression syntax like in this file is actually "official WebAssembly text format" as well?

cc @kripken as the author of the file in question

@sunfishcode
Copy link
Author

Yeah. "wast" is all about adding assert_return and other test commands.

@kripken
Copy link
Contributor

kripken commented Feb 13, 2018

I don't care either way myself, but I didn't know this was something the wasm community cared much about? E.g. in binaryen itself we have many wasts that should probably be wats?

@sunfishcode
Copy link
Author

http://webassembly.org/docs/text-format/ says:

The recommended file extension for WebAssembly code in textual format is .wat.

Note: The .wast format understood by some of the listed tools is a superset of the .wat format that is intended for writing test scripts.

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

No branches or pull requests

3 participants