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
5d9e05c2f6
Add function signature parameters to set import func
2019-02-02 19:10:08 -06:00
Brandon Fish
ffb3dc083a
Add test to import function and call it
2019-02-02 17:43:59 -06:00
Brandon Fish
9120a9d1f8
Implement tagged enum for params/results
2019-02-02 14:53:07 -06:00
Brandon Fish
3633ab8ef4
Add parameters and results
2019-02-02 10:44:08 -06:00
Brandon Fish
be19e96669
Implementing instantiate and call
2019-02-02 00:26:10 -06:00
Brandon Fish
62f7bb607e
Add first c test to test the C api
2019-02-01 22:10:36 -06:00
Brandon Fish
5ebea9672c
Initial commit of C API library
2019-01-31 23:51:34 -06:00