Commit Graph

116 Commits

Author SHA1 Message Date
7441fade9c Final fixes for make test-capi on windows-msvc
- .wasm files should always be opened in "rb" mode
- open_memstream doesn't exist on Windows, use tempfile() instead
- remove .obj and .exe files when the test finish
2022-09-14 22:31:19 +02:00
fd390f6160 Fix first Makefile completely on Windows 2022-09-14 15:55:41 +02:00
05af38c9a5 Port first Makefile to Rust + add MSVC flags 2022-09-14 13:11:48 +02:00
328a98edec Fixup Makefile-based tests to be Rust-based instead 2022-09-13 21:34:02 +02:00
59eb5f177e Fixed compilation on Windows MSVC (first 20 tests) 2022-09-13 18:58:29 +02:00
8da2fdb6a5 Fix Windows build with local dependency 2022-09-13 18:13:54 +02:00
a419ccdf52 Move Webassembly objects to Store and remove Context
Co-authored-by: ptitSeb <sebastien.chev@gmail.com>
Co-authored-by: Manos Pitsidianakis <manos@wasmer.io>
2022-07-19 15:31:51 +03:00
eed0327101 Update c-api examples to Context API 2022-07-19 15:31:51 +03:00
34a6511e16 Port C API to new Context API 2022-07-19 15:31:51 +03:00
e9d54e130c Remove engine-dylib 2022-06-16 16:57:45 +03:00
7193282de5 test(c-api) Clean up the tests/Makefile.
1. Use single tabs rather than three, it fits in a small terminal
   window,
2. `CAPI_WASMER_TESTS` has been removed in
   https://github.com/wasmerio/wasmer/pull/2375, but partially. This
   patch finishes the work.
3. The `test-%: %.o` rule is a remainder of some older code, it's no
   longer needed.
2021-06-08 12:01:19 +02:00
b520a5f58a Renamed wasmer_wasm.h to wasmer.h 2021-06-01 21:47:37 -07:00
f5a7ac960f feat(c-api) Remove the deprecated API.
Until this patch, our C API comes in 2 flavors: `deprecated` and
`wasm_c_api`. With the coming 2.x version of Wasmer, we would like to
remove the `deprecated` API, and keep the `wasm_c_api` only.

This patch removes the `deprecated` API from the `wasmer-c-api`
crate. It also cleans up the `Makefile` and the documentation
system. Previously, the documentation for the `deprecated` API was
relying on Doxygen, which was one new dependency the user had to
install. For the `wasm_c_api`, it relies on `rustdoc`, which is way
better because all examples are run and tested as part of our test
suite.

This clean up also removes the need to deal with `system-libffi` both
in the crate itself and in the `Makefile`, which was an edge case for
macOS on aarch64, and a needle in the foot for some of our users.

Finally, the `build.rs` is now simplified because we no longer need to
exclude symbols from one header to another. It also means that we only
provide the `wasmer_wasm.h` header file now; the `wasmer.h` and
`wasmer.hh` headers are removed.
2021-05-31 17:59:19 +02:00
3d66a2e360 feat: Rename wasmer-engine-native to wasmer-engine-dylib. 2021-05-28 14:13:24 +02:00
79d5f20301 feat: Rename wasmer-engine-native to wasmer-engine-shared-object. 2021-05-28 14:13:24 +02:00
23e52b7c1d !fixup 2021-05-27 13:05:21 +02:00
e5a784a006 feat: Rename wasmer-engine-jit to wasmer-engine-universal.
This (small) patch renames the `wasmer-engine-jit` crate into
`wasmer-engine-universal`.
2021-05-25 16:12:06 +02:00
2e90db6967 Addressed comments 2021-05-18 14:32:21 -07:00
71176cca7a Unified C API tests 2021-05-15 09:15:50 -07:00
bc8cb68d84 Update examples to not free things cast from extern 2021-03-30 08:47:18 -07:00
52901850a9 chore: Build Wasmer on musl
Closes #1482
Closes #1766
2021-03-03 17:07:47 +01:00
2df343dc70 test(c-api) Test WASI captured stdout API. 2021-01-28 11:25:42 +01:00
010f5fb597 Fix spelling Web Assembly -> WebAssembly 2021-01-03 22:01:26 +01:00
d44116251f Remove debug code from multi.c 2020-12-18 07:13:38 -08:00
62663ab5e1 Get multi.c working in the Wasm C API 2020-12-17 14:35:55 -08:00
d6d9e4edf5 chore(c-api) Update the Makefile to remove a test. 2020-12-11 10:10:09 +01:00
042e6ffa73 test(c-api) This is already a unit test in the wat module. 2020-12-11 10:06:34 +01:00
44c987694d Improved formatting of Makefile 2020-12-04 19:52:15 -08:00
5666d01ab3 Removed deprecated dir Makefile 2020-12-04 19:50:05 -08:00
56fa494128 Deleted binaries 2020-12-04 19:47:31 -08:00
0655767477 Deleted unused files 2020-12-04 19:45:12 -08:00
79fb698c15 Remove dependency on cmake 2020-12-04 13:39:44 -08:00
fee319a0f3 Update lib/c-api/tests/wasm_c_api/test-wat2wasm.c
Co-authored-by: nlewycky <nick@wasmer.io>
2020-12-01 12:26:28 -08:00
7b2d0d4037 Signal error condition and update tests 2020-12-01 12:06:41 -08:00
de6cb9c4c4 Merge branch 'master' into feature/host-env-prototype 2020-11-20 15:54:35 -08:00
c4c57868ce Fix tests on deprecated API 2020-11-18 12:05:31 -08:00
2690e5e8f6 Merge branch 'master' into feature/host-env-prototype 2020-11-16 15:13:29 -08:00
7c363ea451 test(c-api) Fix segfault. 2020-11-10 10:57:47 +01:00
5bbfc54757 chore(c-api) Run clang-format. 2020-11-10 10:53:20 +01:00
3b9e045259 test(c-api) Free wat and prevent failure in assert. 2020-11-10 10:49:20 +01:00
75fba28702 Update lib/c-api/tests/wasmer_wasm.h
Co-authored-by: nlewycky <nicholas@mxc.ca>
2020-11-09 20:05:57 +01:00
c88886f09c Merge branch 'master' into test-c-api-inline-c-rs 2020-11-09 17:19:14 +01:00
47b8d289b4 test(c-api) Assert wasm_name_t has the expected size. 2020-11-09 16:24:46 +01:00
69e1b7ccc0 test(c-api) Rollback: Use assert intead of wasmer_assert. 2020-11-09 15:55:31 +01:00
19fe6e482c test(c-api) _wasmer_assert_fail must exit the program. 2020-11-06 15:09:20 +01:00
55b2b88524 test(c-api) Declare a wasmer_assert_name helper. 2020-11-06 11:17:55 +01:00
8fdf928847 test(c-api) Rename our helper wasm_byte_vec_new_from_string to wasmer_…. 2020-11-06 10:16:25 +01:00
33a2651bab test(c-api) Implement wasmer_assert.
`assert.h` does nothing when the code is compiled in release
mode. That's not what we want :-). Let's reimplement `assert` as
`wasmer_assert`, which is close to the original `assert` function.
2020-11-06 09:39:12 +01:00
8009fea945 test(c-api) Include string.h inside tests/wasmer_wasm.h. 2020-11-06 09:03:29 +01:00
a4493ed990 doc(tests) Improve documentation of tests/wasmer_wasm.h. 2020-11-03 10:43:40 +01:00