Commit Graph

361 Commits

Author SHA1 Message Date
Ivan Enderlin
3aaa6dafda doc(interface-types) Improve documentation of the wat module. 2020-02-10 17:12:32 +01:00
Ivan Enderlin
5fa96f062d doc(interface-types) Add a doctest for decoders::binary::parse. 2020-02-10 16:48:25 +01:00
Ivan Enderlin
764edc8022 test(interface-types) Test the parse parser. 2020-02-10 16:39:34 +01:00
Ivan Enderlin
a53b57b595 doc(interface-types) Improve documentation of the binary module. 2020-02-10 16:39:06 +01:00
Ivan Enderlin
8ec4eb429e doc(interface-types) Improve documentation of the ast module. 2020-02-10 15:44:28 +01:00
Ivan Enderlin
57692f0458 doc(interface-types) Improve documentation of the ast module. 2020-02-10 15:41:41 +01:00
Ivan Enderlin
11729b1d4c feat(interface-types) Rename ImportedFunction to Import.
So that we are consistent with `Export`.
2020-02-10 15:41:10 +01:00
Ivan Enderlin
a8da95b339 doc(interface-types) Improve module descriptions. 2020-02-10 15:27:04 +01:00
Ivan Enderlin
74a46288ce doc(interface-types) Improve documentation of the stack module. 2020-02-10 15:23:28 +01:00
Ivan Enderlin
59aee179d2 doc(interface-types) Improve documentation of the crate itself. 2020-02-10 15:22:56 +01:00
Ivan Enderlin
023364c042 test(interface-types) Improve test cases for Stack. 2020-02-10 15:22:22 +01:00
Ivan Enderlin
15ac649f4d chore(interface-types) Format code. 2020-02-10 14:41:40 +01:00
Ivan Enderlin
64ee66ccda test(interface-types) Fix a documentation message. 2020-02-10 14:41:06 +01:00
Ivan Enderlin
e4e319c28d feat(interface-types) Use nom 5.1. 2020-02-10 14:05:13 +01:00
Ivan Enderlin
9f815950ed chore(interface-types) Update crate version. 2020-02-10 13:32:04 +01:00
Ivan Enderlin
74dfa0d8cd feat(interface-types) Remove dev-dependencies to any runtime. 2020-02-10 13:15:52 +01:00
Ivan Enderlin
23c512d33c feat(interface-types) Simplify code. 2020-02-10 13:14:46 +01:00
Ivan Enderlin
3c651cd146 feat(interface-types) Change Instance::local_or_import(&self) to Instance::local_or_import(&mut self).
It allows the instance to create or update locals/imports when the
`local_or_import` function is called. It's not ideal, but fine enough
for a first step.
2020-02-10 13:14:19 +01:00
Ivan Enderlin
1352424a6c chore(interface-types) The tests/ directory has moved in wasmer-runtime-core-tests. 2020-02-10 13:13:03 +01:00
Ivan Enderlin
0a2b094d02 chore(interface-types) Simplify the code. 2020-02-10 13:03:36 +01:00
Ivan Enderlin
f206ccd55f feat(interface-types) Introduce the wasm::structures::MemoryView trait. 2020-02-10 13:00:29 +01:00
Ivan Enderlin
a27782ac66 chore(cargo) Remove patches from version contraints. 2019-09-26 15:05:22 +02:00
Ivan Enderlin
6fee3acf59 feat(interface-types) Add attributes. 2019-09-26 15:02:20 +02:00
Ivan Enderlin
cae0640d75 feat(interface-types) Let the type inference engine do the work. 2019-09-26 14:37:29 +02:00
Ivan Enderlin
cabb277f14 feat(interface-types) Rename a variable. 2019-09-26 14:18:30 +02:00
Ivan Enderlin
1478ad8b4e chore(interface-types) Simplify the executable_instruction macro. 2019-09-26 14:17:43 +02:00
Ivan Enderlin
c042050497 feat(interface-types) Split the interpreter into multiple modules/files. 2019-09-26 14:14:46 +02:00
Ivan Enderlin
e509f97c2d fix(interface-types) Fix typos in error messages. 2019-09-26 01:02:29 +02:00
Ivan Enderlin
cecb00bd6a feat(interface-types) Create vectors with specific capacity when possible. 2019-09-26 01:00:17 +02:00
Ivan Enderlin
0e1422f16a feat(interface-types) Implement the write-utf8 executable instruction. 2019-09-26 00:55:26 +02:00
Ivan Enderlin
77546784cf chore(interface-types) Re-order match arms. 2019-09-25 23:30:41 +02:00
Ivan Enderlin
07055522a1 feat(interface-types) Update Instruction. 2019-09-25 23:29:08 +02:00
Ivan Enderlin
5e08e76899 test(interface-types) Use macros to reduce test boilerplate. 2019-09-25 23:13:26 +02:00
Ivan Enderlin
429868a125 feat(interface-types) Implement the call executable instruction.
The patch requires to implement the `wasm::TypedIndex`,
`wasm::LocalImportIndex`, and the `wasm::LocalImport` traits.
2019-09-25 21:53:23 +02:00
Ivan Enderlin
3361b3d9a8 feat(interface-types) Implement the read-utf8 instruction.
It implies to create the `wasm::Memory` trait.

Also, the patch updates `wasm::Type` and `wasm::Value` to
`wasm::InterfaceType` and `wasm::InterfaceValue`. It enforces a new
rule that is: All values in the stack must be owned by the stack. Any
value going in or out must be cloned.
2019-09-23 16:29:01 +02:00
Ivan Enderlin
1eea395679 test(interface-types) Test calling a void exported function. 2019-09-20 14:59:18 +02:00
Ivan Enderlin
f694cf9945 feat(interface-types) Better error message when calling an exported function failed. 2019-09-20 14:55:37 +02:00
Ivan Enderlin
342a57d36f feat(interface-types) Check signature of the exported function to call. 2019-09-20 14:31:15 +02:00
Ivan Enderlin
c59993e4e2 feat(interface-types) The interpreter stack contains Wasm values. 2019-09-20 14:07:56 +02:00
Ivan Enderlin
f453af05c6 chore(interface-types) Fix clippy warnings. 2019-09-20 12:02:11 +02:00
Ivan Enderlin
305e269fc0 feat(interface-types) Stack supports Default. 2019-09-20 11:55:19 +02:00
Ivan Enderlin
19309a80d5 feat(interface-types) Implement CallExport executable instruction.
It requires to create the `wasm::Export` trait, plus the `wasm::Type`
and the `wasm::Value` enums.
2019-09-20 11:37:38 +02:00
Ivan Enderlin
2f30977ef7 feat(interface-types) Add an abstract Wasm instance and a runtime to the interpreter. 2019-09-20 00:06:15 +02:00
Ivan Enderlin
ef19987e84 feat(interface-types) Continue. 2019-09-19 23:05:17 +02:00
Ivan Enderlin
f2ef6c0895 feat(interface-types) Continue. 2019-09-19 00:25:28 +02:00
Ivan Enderlin
23d5e7b7b3 feat(interface-types) Draft instruction interpreter. 2019-09-19 00:18:36 +02:00
Ivan Enderlin
dcf8a12cdb feat(interface-types) Encode Interfaces to WAT. 2019-09-18 18:02:05 +02:00
Ivan Enderlin
37920f1a8e chore(interface-types) Bump to 0.7.0. 2019-09-18 17:14:57 +02:00
Ivan Enderlin
8c7d46c124 chore(interface-types) Update to Wasmer 0.7.0. 2019-09-18 17:14:12 +02:00
Ivan Enderlin
68e699e495 feat(interface-types) Add new instructions. 2019-09-18 17:12:42 +02:00