-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add a --target option to wasm2obj #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple notes below. Don't worry about the CI failure; that's just rustfmt churn which I've now fixed on master.
src/wasm2obj.rs
Outdated
wasm2obj --help | --version | ||
|
||
Options: | ||
-v, --verbose displays the module and translated functions | ||
-h, --help print this help message | ||
--target <TARGET> build for the target triple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a mention here that the default behavior is to target the host?
Oh, also, forgot to ask: is it desirable to make a similar change to wasmtime in addition to wasm2obj? |
I don't think so, because wasmtime is just JITing the code into memory and executing it, so the target should match the host. |
358fb49
to
878c36f
Compare
Rebased and added note about host compilation. |
878c36f
to
1d4fc66
Compare
1d4fc66
to
0195611
Compare
Looks good! |
* Implement fmt::Display for enums `wasi_common` relies on `strerror` to nicely format error messages. `strerror` is autoimplemented in `wig`. I thought it might be useful to provide a Rust-idiomatic alternative which boils down to autoimplementing `fmt::Display` for all enums. * Implement fmt::Display for flags * Implement fmt::Display for ints
…lliance#18) * fix readme of wrong NewInstance not enough arguments error * [readme] update go package version to 0.17.0
* Update to latest wasmtime APIs * Update CI to latest Go 1.13 and 1.14 releases (bytecodealliance#19) 1.14.3 at least had a change to cgo, maybe we'll get lucky. Not sure what your thoughts are on how many point releases to cover in CI, so I just bumped 1.13 and 1.14 to the latest. * fix readme of wrong NewInstance not enough arguments error (bytecodealliance#18) * fix readme of wrong NewInstance not enough arguments error * [readme] update go package version to 0.17.0 * lint and fmt code in Go style - DONE: convert strcut and func docstring to Go style - DONE: if block ends with a return statement, so drop this else and outdent its block - DONE: don't use ALL_CAPS in Go names; use CamelCase - DONE: dont use underscore in names - DONE: receiver name config should be consistent with previous - DONE: add comments according to webassembly spec * fmt Co-authored-by: Alex Crichton <alex@alexcrichton.com> Co-authored-by: Alex Vidal <alexvidal@khanacademy.org> Co-authored-by: lan <liangyuanpengem@163.com>
* Restore compatibility with wasm-tools. * An auxiliary function to get the arity of a continuation from an index * Fetch wasmparser and wast dependencies from effect-handlers/wasm-tools#typed-continuations
* Restore compatibility with wasm-tools. * An auxiliary function to get the arity of a continuation from an index * Fetch wasmparser and wast dependencies from effect-handlers/wasm-tools#typed-continuations
* Restore compatibility with wasm-tools. * An auxiliary function to get the arity of a continuation from an index * Fetch wasmparser and wast dependencies from effect-handlers/wasm-tools#typed-continuations
* Restore compatibility with wasm-tools. * An auxiliary function to get the arity of a continuation from an index * Fetch wasmparser and wast dependencies from effect-handlers/wasm-tools#typed-continuations
* Restore compatibility with wasm-tools. * An auxiliary function to get the arity of a continuation from an index * Fetch wasmparser and wast dependencies from effect-handlers/wasm-tools#typed-continuations
Feedback on this welcome.