Commit Graph

83 Commits

Author SHA1 Message Date
2ce2c9c7d5 feat(c-api) Add the WASMER_VERSION_{MAJOR|MINOR|PATCH|PRE} constants in C. 2020-12-11 11:03:01 +01:00
fdeb4a6845 feat(c-api) Add the WASMER_VERSION constant in C. 2020-12-11 10:51:40 +01:00
96a0d73ef8 fix(c-api): Remove the use of to link to Wasmer C API. 2020-11-13 21:09:04 +01:00
458daebe8c fix(c-api) Add -rpath to the linker only on Linux. 2020-11-13 17:04:10 +01:00
7cfd2ad161 fix(c-api) Use latest version of inline-c-rs and fix rpath on Linux. 2020-11-13 15:23:21 +01:00
637862dcdc test(c-api) Enable debug mode for C tests. 2020-11-09 15:45:17 +01:00
f02b8510d8 chore(c-api) Assert that shared object directory is well constructed.
Before `pop`ing the filename, let's check whether it's what we expect!
2020-11-06 08:59:37 +01:00
1d208af530 test(c-api) Create a tests/wasmer_wasm.h file.
Remove the `build.rs` hack to add helper functions that are used only
in our tests. Now the tests can use the `tests/wasmer_wasm.h` file,
which simplifies the test workflow: No need to hack the build script
or anything if we want to add a helper function.
2020-11-03 10:41:00 +01:00
ffba18d7b5 feat(c-api) Add a wasm_byte_vec_new_from_string helper.
It's very similar to `wasm_name_new_from_string` but for
`wasm_byte_vec_t`. It does not make sense to get that in the standard,
but it's very useful when writing tests.
2020-11-02 16:23:56 +01:00
6b75648d82 test(c-api) Configure and start using inline-c-rs. 2020-11-02 15:49:52 +01:00
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