Commit Graph

23 Commits

Author SHA1 Message Date
1b3254cf6a Move the generated-by comment up to the first comment. 2020-10-23 11:16:30 -07:00
e28fd7e755 Add a comment indicating what generates this file. 2020-10-23 11:10:21 -07:00
bb1b89f4f7 Removed all usages of wasm_instance_get_vmctx_ptr 2020-10-16 21:39:23 -07:00
c5d5ac7bfe Merge #1693
1693: Add `wasmer create-exe` r=MarkMcCaskey a=MarkMcCaskey

This adds the `wasmer create-exe` subcommand.  This subcommand is a combination of `wasmer compile --object-file` and linking that compiled Wasm with a main function and libwasmer.  Put more plainly: it lets us transform Wasm modules into native executables in one step.

In order for this to work we need:
- [x] Ship wasm.h with Wasmer or use different mechanism to find it
- [x] Ship wasmer_wasm.h with Wasmer
- [x] Requires up to date libwasmer... had to build one and copy it over, may fail in CI because of this... will be fixed with next release though
- [x] More gracefully handle wasmer installed without WASMER_DIR, etc (even if just error messages, should be tested)
- [x] Add tests

# Review

- [ ] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <5770194+MarkMcCaskey@users.noreply.github.com>
2020-10-13 21:46:16 +00:00
fd63ddb101 Merge branch 'master' into feature/wasmer-create-exe 2020-10-12 15:54:54 -07:00
b9f98ce1f6 feat(c-api) Update .h files. 2020-10-12 17:54:21 +02:00
ba7b24f696 Add --dir and --mapdir support to native executable 2020-10-09 17:38:14 -07:00
02c0df5101 Update to cbindgen 0.15.0
Manually specify that items should be sorted by name in the header
file. We do this because cbindgen 0.15.0 removed sorting by default.
2020-10-08 14:42:00 -07:00
ea8bb1ee79 Merge branch 'master' into feature/engine-object-file 2020-10-06 17:50:55 -07:00
ded3132b44 feat(c-api) Implement wat2wasm. 2020-10-06 11:09:35 +02:00
0f8d68652f Finish merge with C API refactor 2020-10-05 12:30:58 -07:00
2fdd9ea692 feat(c-api) Simplify the build.rs script. 2020-10-02 10:10:24 +02:00
a2854ebfea fix(c-api) Adjust cbindgen metadata for header files. 2020-10-01 21:20:13 +02:00
5ea1f1eb25 feat(c-api) Always generate _all_ C headers. Include the deprecated API per default. 2020-10-01 09:52:23 +02:00
f5a57b84e9 fix(c-api) Exclude non-standard WASI API from wasmer.h. 2020-09-29 16:21:16 +02:00
cab0854d99 feat(c-api) Rename the include-deprecated feature to deprecated, and change strategy.
When `deprecated` is enabled, the `deprecated` module is included in
the crate.

When `deprecated` is enabled, **only** the `wasmer.h*` header files
will be generated.

When `deprecated` is disabled, **only** the `wasmer_wasm.h` header
file will be generated.
2020-09-29 16:04:25 +02:00
570b174fb5 fix(c-api) Polish deprecated API. 2020-09-28 15:45:52 +02:00
b59db4cee2 feat(c-api) wasmer_wasm.h includes wasm.h. 2020-09-28 14:52:27 +02:00
174b03f4e9 feat(c-api) Use our fork of cbindgen.
Our fork contains incoming PR. It helps for example to skip struct
fields.
2020-09-24 16:15:04 +02:00
3514988462 feat(c-api) Generate wasmer_wasm.h automatically. First draft. 2020-09-22 16:54:22 +02:00
9e8b80c2f6 feat(c-api) Ensure Rust documentation is used as C's. 2020-09-22 13:18:18 +02:00
8c03da87a9 feat(c-api) Reorganize the build.rs script. 2020-09-22 13:14:48 +02:00
b834714364 Rename runtime-c-api -> c-api 2020-05-08 12:59:44 -07:00