Bo Yao
dadc81296a
cargo fmt
2021-04-21 16:06:12 -07:00
Bo Yao
24bcc9349e
cargo fmt
2021-04-21 15:42:47 -07:00
Mark McCaskey
5650e12f40
Fix wasm_instance_exports exports memory leak in C API tests
2021-03-18 08:30:11 -07:00
Ivan Enderlin
d3f7b7ef70
chore(c-api) Change operator to wasm_operator (reserved keyword in C++).
2021-03-05 00:57:40 +01:00
Ivan Enderlin
06a00d9bd0
doc(c-api) Update documentation for clarity.
2021-03-05 00:56:18 +01:00
Ivan Enderlin
1700c2d056
feat(c-api) Return ~1 if metering are exhausted. Add wasmer_metering_points_are_exhausted.
2021-03-05 00:49:13 +01:00
Ivan Enderlin
2d20f44365
fix(c-api) Remove useless unsafe marker.
2021-03-04 23:39:43 +01:00
Ivan Enderlin
4f2ba728dd
feat(c-api) Simplify the metering API.
...
This patch removes the following type and functions:
* `wasmer_metering_points_t`,
* `wasmer_metering_points_delete`,
* `wasmer_metering_points_is_exhausted`,
* `wasmer_metering_points_t`,
* `wasmer_metering_points_unwrap_or`.
Now, `wasmer_metering_get_remaining_points` returns the number of
points, with zero to represent `MeteringPoints::Exhausted`.
The API is greatly simplified as there is no longer need to allocate
and deallocate a `wasmer_metering_points_t` type.
2021-03-04 22:53:02 +01:00
Ivan Enderlin
f0024c5994
doc(c-api) Fix typos.
2021-03-04 22:34:04 +01:00
Ivan Enderlin
e7c78e77ee
test(c-api) Update tests for the metering API.
2021-03-04 21:49:39 +01:00
Ivan Enderlin
0163b33ff3
test(c-api) Update the test to use a custom user-defined cost function.
2021-03-04 17:29:39 +01:00
Ivan Enderlin
e2c4f1ee69
feat(c-api) Rename Operator to wasmer_parser_operator_t.
2021-03-04 17:15:28 +01:00
Ivan Enderlin
7780423c81
feat(c-api) wasmer_metering_t contains a closure to the cost function.
2021-03-04 17:07:47 +01:00
Ivan Enderlin
902f58e32d
!tmp
2021-03-02 17:42:43 +01:00
Ivan Enderlin
19c04124b1
doc(c-api) Write more documentation and tests.
2021-03-02 16:32:02 +01:00
Ivan Enderlin
31669b8cdc
feat(c-api) Rename wasmer_module_middleware_t to wasmer_middleware_t.
...
Also, move it into the `unstable::middleware` module.
2021-03-02 15:20:23 +01:00
Ivan Enderlin
8f1a4f3406
feat(c-api) Add wasmer_metering_delete.
2021-03-01 17:31:04 +01:00
Ivan Enderlin
cb02694abc
test(c-api) Add tests for the wasmer_metering_* API.
2021-03-01 17:11:09 +01:00
Ivan Enderlin
8b30ae9d41
feat(c-api) Add _delete and rename _value to wasmer_metering_points_unwrap_or.
2021-03-01 17:10:27 +01:00
Ivan Enderlin
cbbdfdaefa
temp
2021-03-01 16:41:44 +01:00
Ivan Enderlin
2bc502bd47
fix(c-api) Move the middleware API into the unstable module.
2021-03-01 15:27:56 +01:00