Commit Graph

41 Commits

Author SHA1 Message Date
Ivan Enderlin
f233ca444e chore(api) The compiler feature enables wasmer-compiler/translator. 2021-03-04 23:17:14 +01:00
Ivan Enderlin
072066acaf Merge branch 'master' into feature/metering-c-api 2021-03-04 22:31:12 +01:00
Ivan Enderlin
798dd888c4 feat(c-api) Simplify a compilation condition. 2021-03-02 15:24:48 +01:00
Ivan Enderlin
31669b8cdc feat(c-api) Rename wasmer_module_middleware_t to wasmer_middleware_t.
Also, move it into the `unstable::middleware` module.
2021-03-02 15:20:23 +01:00
Ivan Enderlin
fb973b2af1 fix(c-api) wasmer_module_middleware_t is an opaque type. 2021-03-02 14:58:18 +01:00
Ivan Enderlin
db4286d576 fix(c-api) Fix merge conflict. 2021-03-01 16:44:04 +01:00
Ivan Enderlin
0f43391b78 Merge branch 'master' into feature/metering-c-api 2021-03-01 16:43:16 +01:00
Ivan Enderlin
d1fc49d9c2 feat(c-api) Introduce the wasmer_features_t unstable API.
This API is a wrapper around the `wasmer_types::Features` API. A new
function `wasm_config_set_features` allows to define features for the
engine and the compiler.
2021-03-01 16:02:43 +01:00
Ivan Enderlin
bd25fafeb5 Merge branch 'master' into chore-c-api-formalization 2021-02-18 15:15:11 +01:00
Ivan Enderlin
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
Ivan Enderlin
fbe4e07476 test(c-api) Remove no_run for 2 doctests. 2021-02-12 10:44:14 +01:00
Ivan Enderlin
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
Nick Lewycky
197d0f7a49 Initial commit of C API for metering and middleware. 2021-02-09 01:20:34 -08:00
Ivan Enderlin
e4057469bc chore(c-api) get_default_compiler_config can stay private. 2021-01-29 14:29:50 +01:00
Ivan Enderlin
9fda912f31 feat(c-api) wasm_config_t and wasm_engine_new_with_config handle the target. 2021-01-29 14:27:07 +01:00
Ivan Enderlin
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
Mark McCaskey
0c13314179 Add wasm_config_delete to the Wasm C API 2021-01-25 07:54:49 -08:00
Ivan Enderlin
4558b8739d doc(c-api) Complete or improve the documentation of the engine module. 2020-12-14 15:28:33 +01:00
jubianchi
401b9e4db5 test(c-api) Add no_run to engine tests.
Because we test the C API with many features combination, we can't ensure tests will pass with every combination
2020-12-10 18:42:01 +01:00
Ivan Enderlin
90778f6d66 test(c-api) Change ignore to no_run. 2020-12-10 17:14:16 +01:00
Ivan Enderlin
bcf65008c4 test(c-api) Disable on doctest, it cannot run if JIT is disabled. 2020-12-10 16:44:35 +01:00
Ivan Enderlin
6e7cd02425 doc(c-api) Specify when functions are Wasmer-specific. 2020-12-10 16:18:10 +01:00
Ivan Enderlin
f8935b3561 Merge branch 'master' into test-c-api 2020-12-10 16:01:14 +01:00
Syrus Akbary
e7bf70ff81 Fixed compilation issue 2020-12-04 15:13:48 -08:00
Syrus
13e6f29c29 Set compiler config to be owned (following wasm-c-api) 2020-12-04 02:39:19 -08:00
Ivan Enderlin
34530306e6 test(c-api) Test the engine module. 2020-11-30 15:42:04 +01:00
Ivan Enderlin
5a71aceb45 doc(c-api) Document the engine module. 2020-11-30 15:41:54 +01:00
Syrus
2d2b9069c7 Fix comments 2020-11-18 11:05:18 -08:00
Syrus
5ba682d581 Only ship the compiler variable if there are available compilers 2020-11-18 09:59:32 -08:00
Ivan Enderlin
35c4329150 feat(c-api) Generate errors when wasm_engine_new fails. 2020-11-16 10:49:37 +01:00
Ivan Enderlin
ce525e7e90 doc(c-api) Update documentation. 2020-10-27 13:53:47 +01:00
Ivan Enderlin
4584a53840 fix(c-api) Remove rustc warnings. 2020-10-12 13:12:37 +02:00
Mark McCaskey
e6bc138b10 Remove ability to use object file engine with compiler from C API
Due to the way object file engine works, it only makes sense to use in
headless mode from the C API.
2020-10-06 17:39:51 -07:00
Mark McCaskey
aa2e8f7b4d Address more feedback, clean up code 2020-10-06 12:13:59 -07:00
Mark McCaskey
0f8d68652f Finish merge with C API refactor 2020-10-05 12:30:58 -07:00
Mark McCaskey
f0487763bf Readd functionality from object file engine 2020-10-02 17:31:18 -07:00
Ivan Enderlin
ae1a50b5d7 chore(c-api) Move cbindgen:ignore from functions/types to modules.
This patch removes the amount of `cbindgen:ignore` instructions by
moving this instruction onto the parent module.
2020-10-02 09:51:48 +02:00
Ivan Enderlin
1c0708df33 fix(c-api) Add missing JIT symbol. 2020-09-28 15:39:33 +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
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
5b72815a00 feat(c-api) Extract engine and store into their own module. 2020-09-22 17:08:57 +02:00