Syrus Akbary
74e64b5889
Update libffi
2020-11-20 08:10:50 -08:00
Syrus
c4c57868ce
Fix tests on deprecated API
2020-11-18 12:05:31 -08:00
Syrus
2d2b9069c7
Fix comments
2020-11-18 11:05:18 -08:00
Syrus
5ba682d581
Only ship the compiler variable if there are available compilers
2020-11-18 09:59:32 -08:00
Syrus
afbaf129b8
Added deprecated flag to the wasm c api crate
2020-11-18 09:59:12 -08:00
Ivan Enderlin
619f9a9c52
doc(c-api) Fix links in DEVELOPMENT.md
...
Oops, bad Markdown syntax. This patch fixes it!
2020-11-17 13:37:05 +01:00
Ivan Enderlin
b2ea42d1d8
doc(c-api) Add links to wasm.h and its own annotation.
2020-11-16 16:02:15 +01:00
Ivan Enderlin
2e52e1139b
chore(c-api) Update wasmer_wasm.h.
2020-11-16 15:19:17 +01:00
Ivan Enderlin
287084aa3e
fix(c-api) Allow finalizer to be NULL.
2020-11-16 14:43:26 +01:00
Ivan Enderlin
d6af40bdd5
fix(c-api) wasm_functype_new frees params and results correctly.
2020-11-16 14:12:53 +01:00
Ivan Enderlin
1a1e38eaea
feat(c-api) Implement From<&wasm_valtype_t> for ValType.
2020-11-16 14:04:17 +01:00
Ivan Enderlin
24b9b1b2e7
fix(c-api) Remove a warning by handling a Result.
2020-11-16 11:33:31 +01:00
Ivan Enderlin
cb3367d377
fix(c-api) Remove a FFI-unsafe operation.
2020-11-16 11:24:48 +01:00
Ivan Enderlin
76d7c4ed1b
feat(c-api) Raise an error when wasm_module_deserialize fails.
2020-11-16 11:19:42 +01:00
Ivan Enderlin
ffad2d7bad
fix(c-api) Fix a typo.
2020-11-16 11:19:17 +01:00
Ivan Enderlin
0eab5926af
doc(c-api) Clarify how destructors work.
2020-11-16 11:14:54 +01:00
Ivan Enderlin
4feaac085c
doc(c-api) Clarify the Rust pattern to handle const *T.
2020-11-16 11:09:21 +01:00
Ivan Enderlin
03b34144bf
feat(c-api) wasm_functype_(params|results) handle null pointers.
2020-11-16 11:09:02 +01:00
Ivan Enderlin
cf9e2fbcdd
chore(c-api) Use Option<&T> rather than Option<NonNull<T>>.
2020-11-16 11:07:02 +01:00
Ivan Enderlin
10555eb01e
doc(c-api) Fix a typo.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
e78114be70
fix(c-api) Add the own annotations for Wasmer specific API.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
73244111a6
fix(c-api) Rewrite wasm_val_copy to use &mut and no unwrap.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
d3c496f8a0
chore(c-api) Code clean up.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
69c23fd78f
doc(c-api) Add the own annotation when necessary.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
3a5fad1ac4
feat(c-api) wasm_module_validate handles null pointers + use into_slice() for bytes.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
cf0098ffd0
feat(c-api) wasm_module_new handles null pointers + use into_slice() for bytes.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
ce10285be2
fix(c-api) Remove done TODO.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
152f1d980c
feat(c-api) wasm_instance_new handles null pointers.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
35c4329150
feat(c-api) Generate errors when wasm_engine_new fails.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
ba6115f348
feat(c-api) More functions handle null pointers + rename variables.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
6f2957b4b3
feat(c-api) More functions handle null pointers.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
5db1ab7c37
feat(c-api) More functions handle null pointers.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
0ce3b27da1
feat(c-api) wasm_global_new handles null pointers.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
e27ce51303
feat(c-api) wasm_func_call handles null pointers.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
b42c699be0
feat(c-api) Support null pointers in wasm_func_new_with_env.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
2735461caf
feat(c-api) wasm_func_new supports null pointers for its arguments.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
19cc55fb0d
doc(c-api) Add another possible Rust pattern
2020-11-16 10:49:37 +01:00
Ivan Enderlin
ee71166f65
doc(c-api) Remove the // own inline doc.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
3df35e1aff
fix(c-api) Fix memory leak in wasm_functype_new.
...
`wasm_functype_new` takes the ownership of `params` and `results`. By
using `Box`, we are sure they are dropped correctly inside the
function.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
84d807716e
doc(c-api) Add Dvelopment Notes.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
8ef36491d4
fix(c-api) wasm_exporttype_t owns its data.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
f3a542eb8c
doc(c-api) Remove an outdated comment.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
d7bcf0442a
fix(c-api) Correctly drop wasm_importtype_vec_t from wasm_module_imports.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
cc04d67263
fix(c-api) Fix a segfault and detect a new memory leak.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
4ab83ed545
fix(c-api) Remove TODO for From<&ImportType> for wasm_importtype_t.
...
A `String` is a `Vec<u8>` by definition, nothing more. Freeing one is
like freeing another.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
8bdfad18d1
fix(c-api) wasm_importtype_t _owns_ its fields.
...
The `wasm.h` file defines `wasm_importtype_new` to take ownership of
the module, the name, and the extern type. This patch thus changes
`NonNull` to `Box` for those types.
`wasm_importtype_new` also handles null pointer with `Option<Box<T>>`
and returns an `Option<Box<T>>`.
The rest of the code is simplified. The patch fixes also some typos in
variable namings.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
9635e43c08
fix(c-api) Remove the memory leak in wasm_tabletype_element.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
7212ab45fd
fix(c-api) Remove memory leaks with wasm_tabletype_limits.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
1604999595
fix(c-api) Remove memory leak with wasm_globaltype_content.
2020-11-16 10:49:37 +01:00
Ivan Enderlin
598c4cc276
fix(c-api) Remove memory leak with wasm_memorytype_limits.
2020-11-16 10:49:37 +01:00