losfair
f4df568e41
Naming fixes and documentation for trampoline API.
2019-06-05 01:38:35 +08:00
losfair
669f76025c
Add callinfo trampoline into the C API.
2019-06-05 01:25:37 +08:00
losfair
d70cb9695e
Add trampoline-related functions to C API.
2019-06-03 15:31:42 -07:00
Ivan Enderlin
11f1bbaf9a
chore(runtime-c-api) Update C/C++ header files.
2019-05-22 16:45:59 +02:00
Ivan Enderlin
8bd9bbb508
chore(runtime-c-api) Update C/C++ header files.
2019-05-14 16:19:32 +02:00
Ivan Enderlin
53661385ed
chore(runtime-c-api) Update C/C++ header files.
2019-05-14 16:17:13 +02:00
Ivan Enderlin
2b250c30f3
chore(runtime-c-api) Regenerate C/C++ header files.
2019-05-14 11:50:10 +02:00
Ivan Enderlin
a59ce13810
chore(runtime-c-api) Build the C and C++ headers.
2019-03-27 10:50:40 +01:00
Ivan Enderlin
57a82fa5cf
fix(runtime-c-api) wasmer_serialized_module_from_bytes
accepts bytes + length instead of wasmer_byte_array
.
2019-03-19 16:24:59 +01:00
Ivan Enderlin
46edd20725
feat(runtime-c-api) Add the wasmer_serialized_module_from_bytes
function.
...
This function is required to transform a `wasmer_byte_array` into a
`wasmer_serialized_module_t`. This is the complementary function of
`wasmer_serialized_module_bytes`.
2019-03-19 10:51:43 +01:00
Ivan Enderlin
5e31a1b6d1
feat(runtime-c-api) Introduce the wasmer_serialized_module_t
struct type.
...
The `wasmer_module_serialize` function now computes a
`wasmer_serialized_module_t` value. The `wasmer_module_deserialize`
function takes this value as an input. Same for
`wasmer_serialized_module_destroy`.
The new function `wasmer_serialized_module_bytes` allows to read the
bytes inside the `wasmer_serialized_mdule_t` structure.
2019-03-19 10:04:31 +01:00
Ivan Enderlin
6605a02316
feat(runtime-c-api) Add the wasmer_module_serialization_destroy
function.
2019-03-18 16:05:04 +01:00
Ivan Enderlin
aac5c88b58
doc(runtime-c-api) Update the documentation of wasmer_module_deserialize
.
2019-03-15 12:18:52 +01:00
Ivan Enderlin
2368ce3a20
chore(runtime-c-api) Regenerate the wasmer.hh?
files.
2019-03-15 12:04:23 +01:00
Ivan Enderlin
5b98ee732c
feat(runtime-c-api) wasmer_validate
expects a *const uint8_t
.
...
This patch updates the first argument of `wasmer_validate` from `*mut
uint8_t` to `*const uint8_t`. Indeed, the
`wasmer-runtime-core::validate` function doesn't expect a mutable
slice, so it's not required to expect a mutable array from C.
Also, it's likely for the Wasm bytes to be stored in the
`wasmer_byte_array` structure. The first field `bytes` is defined as
`*const uint8_t`. So this patch avoids a cast when writing a C++
program.
2019-03-14 12:33:40 +01:00
Ivan Enderlin
a11d454130
feat(runtime-c-api) Add an API to update vm::Ctx.data
.
...
This patch adds 2 functions for the runtime C API, respectively
`wasmer_instance_context_data_set` and
`wasmer_instance_context_data_get`. The goal is to modify the
`vm::Ctx.data` field in the `runtime-core` library.
This is required to pass dynamic data to imported functions for
instance.
2019-03-11 16:50:18 +01:00
Brandon Fish
628caf0a74
Make import_func_new/destroy not const
2019-03-07 22:59:11 -06:00
Ivan Enderlin
dcb4032e9d
test(runtime-c-api) Fix compilation errors in test-imports.c
.
2019-03-07 10:15:32 +01:00
Ivan Enderlin
d709191be1
doc(runtime-c-api) Declare the example as C, so that they are not tested.
...
Those examples contain C code. They must not be run by `rustdoc` as
tests.
2019-03-06 12:08:02 +01:00
Ivan Enderlin
25feef7384
chore(runtime-c-api) Regenerate the header files.
2019-03-05 10:07:08 +01:00
Brandon Fish
adfdf4d85d
Merge branch 'master' into feature/add-c-api-module-import-descriptors
2019-03-01 12:50:35 -06:00
Brandon Fish
0792cc7018
Merge branch 'master' into feature/c-api-call-an-exported-func
2019-03-01 12:14:56 -06:00
Brandon Fish
b008a054de
Fix C API to allow calling an exported func
2019-02-24 12:22:24 -06:00
Brandon Fish
1dfa106850
Add C API module import descriptors
2019-02-23 18:25:51 -06:00
Brandon Fish
17fe7bdaea
Add C API module export descriptors
2019-02-23 15:41:38 -06:00
Brandon Fish
ac57a1bc71
Add C API module_instantiate function
2019-02-20 23:08:23 -06:00
Brandon Fish
d2f3023191
Allow specifying optional max value in limits
2019-02-19 00:05:08 -06:00
Brandon Fish
a77d1be983
Remove unused API functions
2019-02-17 14:48:30 -06:00
Brandon Fish
7bb947aba7
Add func signature lookup functions
2019-02-17 14:12:05 -06:00
Brandon Fish
56079ad589
Add compile Module function
2019-02-15 19:47:00 -06:00
Brandon Fish
3ebb80e50e
Update imports and add func_new
2019-02-15 09:40:28 -06:00
Brandon Fish
bfd5e21605
Add export_name and export_func
2019-02-14 00:00:39 -06:00
Brandon Fish
93979aeae2
Add get exports from instance
2019-02-13 20:02:11 -06:00
Brandon Fish
27cbfc0b0b
Add documentation to API functions
2019-02-11 23:14:32 -06:00
Brandon Fish
019ef9ea01
Consolidate result type to one enum
2019-02-11 19:07:28 -06:00
Brandon Fish
b70e319f5c
Add initial error messaging
2019-02-10 17:57:23 -06:00
Brandon Fish
66bf13c9dd
Add memory data function
2019-02-10 15:20:35 -06:00
Brandon Fish
7ef472dae2
Add instance context memory
2019-02-10 14:24:36 -06:00
Brandon Fish
0cfe864fe6
Add Memory data length
2019-02-10 14:14:42 -06:00
Brandon Fish
2fa9cec0ed
Add include guard
2019-02-09 18:07:05 -06:00
Brandon Fish
a0288c87ac
Add Memory Grow C API
2019-02-09 17:53:03 -06:00
Brandon Fish
94c5acedbf
Add basic Global API
2019-02-09 17:39:15 -06:00
Brandon Fish
8364c39b4c
Add Table grow function
2019-02-09 13:58:50 -06:00
Brandon Fish
4e5e525626
Add basic Table functions
2019-02-09 13:37:07 -06:00
Brandon Fish
309246e0d6
Add validate function and test
2019-02-05 00:01:01 -06:00
Brandon Fish
8d8dea7ec8
Implement basic C API memory functions
2019-02-04 21:46:47 -06:00
Brandon Fish
2defd27fac
Also generate C++ bindings
2019-02-04 19:54:12 -06:00