Commit Graph

128 Commits

Author SHA1 Message Date
b520a5f58a Renamed wasmer_wasm.h to wasmer.h 2021-06-01 21:47:37 -07:00
192b93fb0a Merge branch 'master' into feat-c-api-remove-deprecated 2021-05-31 18:09:05 +02: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
7d09f94148 Merge #2364
2364: feat: Rename `wasmer-engine-object-file` to `wasmer-engine-staticlib`. r=Hywan a=Hywan

# Description

This PR renames the `wasmer-engine-object-file` crate into `wasmer-engine-staticlib`. We believe it conveys a better meaning of what it does. This PR is similar to its siblings, #2340 and #2356.

Co-authored-by: Ivan Enderlin <ivan@mnt.io>
2021-05-31 14:32:50 +00:00
c0d3a8f7fc Merge #2161
2161: feat(llvm): Make NaN canonicalization configurable r=jubianchi a=jubianchi

compiler-llvm now uses the experimental.constrained intrinsics to ensure
correct behavior on FP operations when full-canonicalization is
disabled.
    
This patch requires TheDan64/inkwell#247

# Review

- [ ] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: jubianchi <julien@wasmer.io>
2021-05-31 13:21:54 +00:00
5d302f0d4a feat: Rename wasmer-engine-object-file to wasmer-engine-staticlib. 2021-05-31 14:19:14 +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
6a99268895 feat(llvm): Make NaN canonicalization configurable
compiler-llvm now uses the experimental.constrained intrinsics to ensure
correct behavior on FP operations when full-canonicalization is
disabled.

This patch requires TheDan64/inkwell#247
2021-05-28 11:40:10 +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
9a0d0b3dac Update wasmparser in the c-api too 2021-04-29 09:42:54 -07:00
d3f7b7ef70 chore(c-api) Change operator to wasm_operator (reserved keyword in C++). 2021-03-05 00:57:40 +01:00
1700c2d056 feat(c-api) Return ~1 if metering are exhausted. Add wasmer_metering_points_are_exhausted. 2021-03-05 00:49:13 +01:00
96524b5796 chore(c-api) Update headers. 2021-03-05 00:23:46 +01:00
41365360a7 Merge branch 'master' into feature/metering-c-api 2021-03-05 00:18:07 +01:00
4f2ba728dd feat(c-api) Simplify the metering API.
This patch removes the following type and functions:

* `wasmer_metering_points_t`,
* `wasmer_metering_points_delete`,
* `wasmer_metering_points_is_exhausted`,
* `wasmer_metering_points_t`,
* `wasmer_metering_points_unwrap_or`.

Now, `wasmer_metering_get_remaining_points` returns the number of
points, with zero to represent `MeteringPoints::Exhausted`.

The API is greatly simplified as there is no longer need to allocate
and deallocate a `wasmer_metering_points_t` type.
2021-03-04 22:53:02 +01:00
072066acaf Merge branch 'master' into feature/metering-c-api 2021-03-04 22:31:12 +01:00
e2c4f1ee69 feat(c-api) Rename Operator to wasmer_parser_operator_t. 2021-03-04 17:15:28 +01:00
4fb94aff7e Updated header files 2021-03-03 22:14:12 -08:00
902f58e32d !tmp 2021-03-02 17:42:43 +01:00
0c4e0633f4 chore(c-api) Update headers. 2021-03-02 16:32:54 +01:00
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
807bd2d1ee feat(c-api) Update headers. 2021-03-01 16:06:20 +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