Ivan Enderlin
ecb79e2af0
fix(c-api) Cherry-pick manually from https://github.com/wasmerio/wasmer/pull/1657 .
2020-10-01 21:16:29 +02:00
Mark McCaskey
762a6acc85
Add rlib as a crate-type for wasmer-c-api
...
This is how `wasmer-runtime-c-api` was before and seems to fix a use
case that users relied on
2020-10-01 20:59:40 +02:00
Nick Lewycky
9a3c5cf389
Remove extern "C" from a non-pub function that returns non-FFI'able type.
...
Add `extern "C"` to two `#[no_mangle] pub` functions.
2020-10-01 20:58:09 +02:00
Ivan Enderlin
916f50463f
doc(c-api) Restore the README.md.
2020-10-01 14:22:30 +02:00
Ivan Enderlin
bf7b50a8eb
test(c-api) Restore the wasm-c-api test suite.
2020-10-01 14:13:02 +02:00
Ivan Enderlin
3f8d7f4f74
test(c-api) Update the CMake project name for the deprecated test suite.
2020-10-01 10:11:02 +02:00
Ivan Enderlin
c1fb4b2c29
test(c-api) Restore the deprecated test suite.
2020-10-01 10:07:35 +02:00
Ivan Enderlin
5ea1f1eb25
feat(c-api) Always generate _all_ C headers. Include the deprecated API per default.
2020-10-01 09:52:23 +02:00
Mark McCaskey
5ac0f89d92
Add small clean up
2020-09-30 17:10:05 -07:00
Mark McCaskey
fec7644bb8
Port integration test to Windows
...
Add conditional logic for Windows style object files
Explicitly require c11 for wasm.h
Use `clang++` on Windows for `static_assert`
Improve generated C + add hack to make function pointers work better
Add logic to handle Window's static library file extension
Improve linking logic to work on Windows
Add support for C++ compilers for object-file-engine generated C
Add C++ support to wasmer_wasm.h
Add C++ support to test C file too
Add linking flags for Windows, make assert line-ending neutral
Adjust asserted output to handle differences on Windows
2020-09-30 14:46:34 -07:00
Mark McCaskey
ce5f302f9a
Merge branch 'master' into feature/engine-object-file
2020-09-29 17:48:38 -07:00
bors[bot]
d9246398b9
Merge #1657
...
1657: Add early exit example r=MarkMcCaskey a=MarkMcCaskey
Resolves #1597
This PR currently contains the example in both C and Rust
# Review
- [x] Add a short description of the the change to the CHANGELOG.md file
Co-authored-by: Mark McCaskey <mark@wasmer.io >
2020-09-29 23:42:43 +00:00
Mark McCaskey
ffe1c5a9e4
Address feedback, clean up wasm_T_vec_t conversions
2020-09-29 16:41:30 -07:00
Mark McCaskey
1ed1a52d25
Get early exit example working with C API; implement wasm_trap_t API
2020-09-29 14:13:30 -07:00
Nick Lewycky
00741f02cb
Remove extern "C" from a non-pub function that returns non-FFI'able type.
...
Add `extern "C"` to two `#[no_mangle] pub` functions.
2020-09-29 11:04:54 -07:00
Mark McCaskey
374cd36ec2
Add early exit Wasm C API example (wip)
2020-09-29 10:56:02 -07:00
Ivan Enderlin
a259ac6862
chore(c-api) Regenerate wasmer.h header files.
2020-09-29 16:21:48 +02:00
Ivan Enderlin
f5a57b84e9
fix(c-api) Exclude non-standard WASI API from wasmer.h.
2020-09-29 16:21:16 +02:00
Ivan Enderlin
8969756416
chore(c-api) Regenerate header files.
2020-09-29 16:08:54 +02:00
Ivan Enderlin
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
Ivan Enderlin
d55b701e9d
feat(c-api) Make wasi_config_t and wasi_env_t opaque structures.
...
Removing `repr(C)` make them opaque for cbindgen. Which is perfect for what we want.
2020-09-29 16:01:52 +02:00
Ivan Enderlin
4165e389dc
feat(c-api) Use cbindgen@master.
...
Our PR to support `ManuallyDrop`, `MaybeUninit` and `Box` has been
merged, https://github.com/eqrion/cbindgen/pull/578 .
2020-09-29 14:16:09 +02:00
Mark McCaskey
bdbbe7ed2f
Add config support to wasm-c-api
2020-09-28 15:06:00 -07:00
Ivan Enderlin
ecfa22867e
test(c-api) Improve test outputs.
2020-09-28 17:17:25 +02:00
Ivan Enderlin
ffd1e6eddf
test(c-api) Split the test suites (deprecated and wasm-c-api).
2020-09-28 17:09:44 +02:00
Ivan Enderlin
570b174fb5
fix(c-api) Polish deprecated API.
2020-09-28 15:45:52 +02:00
Ivan Enderlin
579d00ffd7
chore(c-api) Fix a bad sed, woops.
2020-09-28 15:40:51 +02:00
Ivan Enderlin
1c0708df33
fix(c-api) Add missing JIT symbol.
2020-09-28 15:39:33 +02:00
Ivan Enderlin
f61a11526c
chore(c-api) Use original cbindgen instead of our fork.
2020-09-28 15:33:42 +02:00
Ivan Enderlin
04ef295a1d
chore(c-api) Regenerate wasmer_wasm.h.
2020-09-28 14:52:55 +02:00
Ivan Enderlin
b59db4cee2
feat(c-api) wasmer_wasm.h includes wasm.h.
2020-09-28 14:52:27 +02:00
Ivan Enderlin
8f627d9834
feat(c-api) Instruct cbindgen to ignore all functions and types defined in wasm.h.
2020-09-28 14:49:44 +02:00
Ivan Enderlin
40865799e6
feat(c-api) Don't create a module for byte and frame.
2020-09-28 14:02:02 +02:00
Mark McCaskey
e23ff69594
Merge branch 'master' into feature/engine-object-file
2020-09-25 11:07:25 -07:00
Mark McCaskey
c29a259679
Add rlib as a crate-type for wasmer-c-api
...
This is how `wasmer-runtime-c-api` was before and seems to fix a use
case that users relied on
2020-09-24 12:00:58 -07:00
Ivan Enderlin
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
Ivan Enderlin
1a0527af78
feat(c-api) Move all types into their own modules.
2020-09-24 11:41:04 +02:00
Ivan Enderlin
44559a9f04
feat(c-api) Move as_extern APIs into the externals module.
2020-09-24 09:48:56 +02:00
Ivan Enderlin
ebcd59de2b
feat(c-api) Extract all macros into their own module.
2020-09-24 09:48:39 +02:00
Ivan Enderlin
50fbb9766d
feat(c-api) Move instance into its own module.
2020-09-24 09:19:53 +02:00
Ivan Enderlin
9b292ad9a7
feat(c-api) Move module into its own module.
2020-09-24 09:10:03 +02:00
Ivan Enderlin
7bb7684823
feat(c-api) Move value into its own module.
2020-09-24 09:06:37 +02:00
Ivan Enderlin
e7f06330c6
feat(c-api) Move function into its own module.
2020-09-24 08:56:28 +02:00
Ivan Enderlin
95fa49d92d
feat(c-api) Move table into its own module.
2020-09-24 08:51:37 +02:00
Ivan Enderlin
bc664b011d
feat(c-api) Move memory into its own module.
2020-09-22 17:21:19 +02:00
Ivan Enderlin
b63ce6e2cf
feat(c-api) Extract global into its own module.
2020-09-22 17:15:52 +02:00
Ivan Enderlin
5b72815a00
feat(c-api) Extract engine and store into their own module.
2020-09-22 17:08:57 +02:00
Ivan Enderlin
d0de895efc
doc(c-api) Clear README.md and symlink wasm.h.
2020-09-22 17:02:12 +02:00
Ivan Enderlin
3514988462
feat(c-api) Generate wasmer_wasm.h automatically. First draft.
2020-09-22 16:54:22 +02:00
Ivan Enderlin
9e8b80c2f6
feat(c-api) Ensure Rust documentation is used as C's.
2020-09-22 13:18:18 +02:00