Ivan Enderlin
4d0312f0ed
test(runtime-c-api) New test suite for wasmer_export_to_memory
.
2019-03-27 10:49:28 +01:00
Ivan Enderlin
5661540097
chore(runtime-c-api) Move .wasm
files into the assets
directory.
2019-03-27 09:42:56 +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
c8872f1a6f
test(runtime-c-api) Test the new wasmer_module_(de)?serialize
functions.
...
This test suite compiles a module, then serializes it, deserializes
it, and continues by creating an instance and calling a function on
it. It allows to test the entire roundtrip.
2019-03-15 12:04:23 +01:00
Ivan Enderlin
f2760249b6
fix(runtime-c-api) Reorganize the tests by alphabetic order.
2019-03-15 12:04:23 +01:00
Ivan Enderlin
5db05fd609
Merge branch 'master' into feat-runtime-c-api-instance-context-data
2019-03-12 09:02:05 +01:00
Ivan Enderlin
675f6817ba
test(runtime-c-api) Free allocations.
...
Don't forget to free `context_data` :-).
2019-03-11 17:41:17 +01:00
Ivan Enderlin
170de02dd3
test(runtime-c-api) Test the wasmer_instance_context_data_*
functions.
2019-03-11 17:34:13 +01:00
Ivan Enderlin
3fea07dc8a
fix(runtime-c-api) Fix the imports
length.
...
`imports` contains `func_import`, `global_import`, `memory_import` and
`table_import`, so 4 items. This patch updates the length of `imports`
when calling the `wasmer_instantiate` function.
2019-03-11 14:35:51 +01:00
Brandon Fish
628caf0a74
Make import_func_new/destroy not const
2019-03-07 22:59:11 -06:00
Ivan Enderlin
1dfae80c65
test(runtime-c-api) Fix compilation errors in test-exports.c
.
2019-03-07 10:15:32 +01:00
Ivan Enderlin
725aff6fee
test(runtime-c-api) Fix a compilation error in test-instantiate.c
.
2019-03-07 10:15:32 +01:00
Ivan Enderlin
603f1fc57d
test(runtime-c-api) Fix compilation errors in test-import-function.c
.
2019-03-07 10:15:32 +01:00
Ivan Enderlin
2a0e42c1e5
test(runtime-c-api) Fix compilation errors in test-memory.c
.
2019-03-07 10:15:32 +01: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
c658224f0c
test(runtime-c-api) Transforms all C/C++ warnings into errors.
...
This patch ensures that all our examples and tests do not generate
warnings. In C, it can be catastrophic sometimes…
Also, be sure that the `cmake` command doesn't emit any warnings too.
2019-03-07 10:15:32 +01:00
Brandon Fish
2077fb448a
Fix C API table/global/memory imports
2019-03-02 22:28:00 -06: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
Mackenzie Clark
2a7a8c0069
newline in test-module-imports.c
2019-02-27 10:41:22 -08: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
Mackenzie Clark
82eef13f41
Create a grow error and refactor grow impl to return result ( #191 )
2019-02-22 22:18:59 -08:00
Brandon Fish
c9969f269c
Use minimum limit as initial table size ( #196 )
2019-02-22 11:16:15 -08:00
Brandon Fish
ac57a1bc71
Add C API module_instantiate function
2019-02-20 23:08:23 -06:00
Brandon Fish
b073145dbb
Clone import in instantiate to prevent import move
2019-02-20 09:52:42 -06:00
Brandon Fish
d2f3023191
Allow specifying optional max value in limits
2019-02-19 00:05:08 -06:00
Brandon Fish
380d766943
Convert from Box into/from raw to pointer ref-deref to fix free issue
2019-02-18 23:30:08 -06:00
Brandon Fish
ee81560e06
Cleanup tests
2019-02-17 16:51:59 -06:00
Brandon Fish
a77d1be983
Remove unused API functions
2019-02-17 14:48:30 -06:00
Brandon Fish
36767e0bd6
Move ctx pointer to first parameter to fix test
2019-02-17 14:39:26 -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
34c45aee3d
Update last error for every error result
2019-02-11 20:08:54 -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
a502da58e3
Fix import object destroy
2019-02-10 14:27:08 -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
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