Commit Graph

106 Commits

Author SHA1 Message Date
e67fd6acf6 feat(c-api) Update headers + add the MIDDLEWARES_FEATURE_AS_C_DEFINE constant. 2021-03-01 17:21:43 +01:00
0f43391b78 Merge branch 'master' into feature/metering-c-api 2021-03-01 16:43:16 +01:00
fd5a9b50d6 chore(c-api) Update headers. 2021-03-01 15:28:37 +01:00
bd25fafeb5 Merge branch 'master' into chore-c-api-formalization 2021-02-18 15:15:11 +01:00
830efaac17 fix(c-api) Use the name wasm_config_set_.
See the discussion here
https://github.com/wasmerio/wasmer/pull/2117#discussion_r575303872.
2021-02-18 15:04:21 +01:00
bd412ea2e5 chore(c-api) Update headers. 2021-02-12 10:36:49 +01:00
17dbb32e5a feat(c-api) Do not rename wat2wasm for the moment. 2021-02-12 00:26:53 +01:00
fd6689c580 chore(c-api) Formalize API prefixes.
The new rule is the following:

* `wasm_` for the standard C API,
* `wasmer_` or `wasi_` for the Wasmer non-standard C API.

For all symbols inside the `unstable` module, the renaming `wasm_` to
`wasmer_` is done without deprecations. It was clear that those API
were unstable.

For all the other symbols, symbols have been renamed to `wasmer_` but
the old symbols have been kept with deprecation warnings.

Special note: The `wasm_named_extern_t` type (and associated
functions) was in `wasi` by mistake. Its place was in the `unstable`
module. This patch also fixes that.

The `wasm_declare_vec_*` macros have been updated to support a default
prefix, or a user-defined prefix. It's now possible to write
`wasm_declare_boxed_vec!(foo);` to get all the API prefixed by `wasm_`
(as previously), or `wasm_declare_boxed_vec!(foo, wasmer);` to prefix
with `wasmer_`.

A user not using symbols from the `unstable` module will continue to
get working code, modulo some deprecations, after this patch.
2021-02-11 23:56:36 +01:00
197d0f7a49 Initial commit of C API for metering and middleware. 2021-02-09 01:20:34 -08:00
fb429e0a6e Update the C API header files. 2021-02-04 19:53:41 -08:00
698a26c7fe fix(c-api) Restore a bug with wasi_get_imports.
We said that `wasi_get_imports` was taking ownership of
`wasi_env_t`. It wasn't. In 9e63ba9a25,
we have fixed this. But it creates another bug when `wasi_env_t` is
used _after_ for example when calling `wasi_env_read_stdout`.

So this patch reverts the bug fix. And we will discuss about how to
fix that later.
2021-02-02 13:42:29 +01:00
e5d5303b50 Merge branch 'master' into feat-c-api-wasi-unordered-imports 2021-02-02 12:17:01 +01:00
4725a5d623 Merge branch 'master' into feat-c-api-cross-compilation-2 2021-02-02 11:07:21 +01:00
b2bc62d43a chore(c-api) Update headers. 2021-02-02 09:23:37 +01:00
d48bc1e67e chore(c-api) Update headers. 2021-02-01 14:58:54 +01:00
0861b73974 Fix rebase. 2021-02-01 12:04:10 +01:00
1042dad5eb chore(c-api) Update headers. 2021-02-01 12:03:08 +01:00
5de7d71e84 chore(c-api) Update headers. 2021-02-01 12:02:10 +01:00
0ad4d319d6 chore(c-api) Update headers. 2021-02-01 12:01:00 +01:00
a6ce35b824 chore(c-api) Update headers. 2021-02-01 11:55:46 +01:00
cbc8b4a773 chore(c-api) Update headers. 2021-02-01 11:50:11 +01:00
7e757ded6b test(c-api) Simplify test by using wasm_name_new_from_string. 2021-01-29 15:04:40 +01:00
3c5692ca2f doc(c-api) Mark some types as unstable. 2021-01-29 14:39:59 +01:00
dc9f8fc82c chore(c-api) Update headers. 2021-01-29 14:34:59 +01:00
b201f12494 feat(c-api) Start implementing wasm_target_t, wasm_triple_t and wasm_cpu_features_t. 2021-01-28 17:26:15 +01:00
2f82d5536f feat(c-api) Rename the wasmer module to unstable. 2021-01-28 15:35:51 +01:00
ca7fc908b5 chore(c-api) Update headers. 2021-01-28 09:23:56 +01:00
1828d8ecff Merge branch 'master' into fix-c-api-wasi-version 2021-01-28 09:18:30 +01:00
af5052598a chore(c-api) Update headers. 2021-01-28 09:15:25 +01:00
95887af4da Include 'extern "C"' in our C header files when included in a C++ build. 2021-01-27 11:41:31 -08:00
4688d9b369 chore(c-api) Disable wasi_config_capture_stdin for the moment`. 2021-01-26 16:21:55 +01:00
79e55927b4 chore(c-api) Update headers. 2021-01-26 14:28:12 +01:00
361ea40042 chore(c-api) Update headers. 2021-01-26 13:19:20 +01:00
434285c0f9 fix(c-api) Use uppercase enum variants for constants of wasi_version_t. 2021-01-26 13:11:44 +01:00
924ffd8797 Prepare for 1.0.1 release 2021-01-12 08:08:19 -08:00
bc73789cc0 Prepare for 1.0.0 release 2021-01-05 06:21:03 -08:00
2d1c03bea0 Prepare for 1.0.0-rc1 release 2020-12-23 11:17:07 -08:00
dd226b1dab Add fixes from publishing 2020-12-16 10:53:09 -08:00
95eff687d7 chore(c-api) Update the header files. 2020-12-14 16:31:26 +01:00
b045b415f6 chore(c-api) Update the header files. 2020-12-14 13:42:29 +01:00
f75eb29620 chore(c-api) Update the header files. 2020-12-14 11:17:46 +01:00
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
18f388df9a Merge branch 'master' into feat-c-api-version 2020-12-11 10:35:26 +01:00
62fa2e506e chore: update wamser_wasm.h 2020-12-10 18:42:41 +01:00
685ef32c29 chore(c-api) Update the header files. 2020-12-10 17:08:32 +01:00
98a283f327 chore: Add a target to test all the C examples 2020-12-04 18:57:10 +01:00
cd55746864 Update docs on wat2wasm function 2020-12-01 12:28:18 -08:00
3e4b416909 Update lib/c-api/wasmer_wasm.h
Co-authored-by: nlewycky <nick@wasmer.io>
2020-12-01 12:26:36 -08:00
deec77d2df Fix memory leak in wat2wasm function 2020-12-01 11:41:28 -08:00