Commit Graph

14 Commits

Author SHA1 Message Date
Wolfgang Silbermayr
89bba319a9 No longer require FunctionEnvMut for new_typed(…) callback function 2022-08-05 14:27:44 +02:00
Wolfgang Silbermayr
7df3e3ca23 Rename {native,typed} functions, reintroduce *_with_env variants 2022-08-05 14:27:44 +02:00
John Sharratt's Shared Account
8ff164036d Removed uint8view() from the memory API and redundant FunctionEnv in tests 2022-08-02 11:33:49 +10:00
John Sharratt's Shared Account
5aa356f222 Fixed a memory corruption issue with JS memory operations that were reusing invalid views 2022-07-31 20:31:41 +10:00
Syrus Akbary
43138b569c Rename all mentions from ctx to store
Updated tests and examples

Improved a bit the function types and results
2022-07-20 01:55:04 +03:00
Syrus Akbary
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
Manos Pitsidianakis
6c089bbc45 Port JS API to new Context API 2022-07-19 15:31:51 +03:00
Manos Pitsidianakis
168e330260 Renamed get_native_function to get_typed_function, marked former as deprecated. 2022-07-19 15:31:51 +03:00
Wolfgang Silbermayr
da4e9fe617 Rename NativeFunc to TypedFunction
Closes: #2915
2022-06-08 14:12:51 +03:00
Manos Pitsidianakis
92b7cb01b5 api/js: Replace ImportObject with new type Imports 2022-06-08 14:09:40 +03:00
Amanieu d'Antras
4924a7c22a Update examples that use RuntimeError::custom to use return a custom
error type directly.
2021-12-20 16:27:24 +01:00
Amanieu d'Antras
17c0834abf Replace RuntimeError::raise with RuntimeError::custom 2021-12-18 00:34:44 +01:00
Syrus Akbary
3319e0f893 Added support for calling dynamic functions defined on the host 2021-08-10 11:07:32 -07:00
Ivan Enderlin
b30284897e feat(api) Merge js-api into api.
This patch takes the entire `wasmer-js` crate and merges it into the
`wasmer` crate.

Inside the `lib/api/src/` directory, there are 2 new directories:

1. a new `sys` directory, which contains the usual `wasmer` crate
   implementation,
2. a new directory `js`, which contains the implementation of
   `wasmer-js`.

The `Cargo.toml` file is still compatible. The `default` feature
fallbacks to `sys-default`, which enables the `sys` feature. All
features related to compilers or engines or anything else prior this
patch, activates the `sys` feature.

Parallel to that, there is a `js-default` and `js` features.

The `Cargo.toml` file is extensively documented to explain what are
dependencies, dev-dependencies, features and other sections related to
`sys` or to `js`.

There is a bug with `wasm_bindgen_test` where it doesn't compile or
look for tests in `tests/*/<test>.rs`. The hack is to name files
`tests/js_<test>.rs`. Ugly, but it works.
2021-07-23 12:10:49 +02:00