Commit Graph

3147 Commits

Author SHA1 Message Date
3bca20d3d3 Add changelog entry, clean up 2020-02-19 16:37:43 -08:00
64cc59179a Merge branch 'master' into feature/debug-prototype2 2020-02-19 16:13:35 -08:00
a2e531bda4 Update to use published wasm-debug; make dep optional in clif-backend 2020-02-19 15:53:36 -08:00
68af917d4c Update field names in wasm-debug types 2020-02-19 15:46:43 -08:00
00e36508d6 feat(interface-types) Parse Adapter in the WAT decoders. 2020-02-19 17:41:06 +01:00
2e78cf1fc0 feat(interface-types) Parse Import in the WAT decoders. 2020-02-19 17:20:18 +01:00
c97122899d feat(interface-types) Start implementing the WAT decoder. 2020-02-19 16:12:06 +01:00
1ac59a31f6 Add various small improvements, update attributions file 2020-02-18 17:31:12 -08:00
3653a448f5 Clean up code, add documentation, implement pieces properly 2020-02-18 16:51:02 -08:00
3d4d6eb366 Merge #1223
1223: feat(runtime-core) Implement `TryFrom<native_type>` for `Value` r=Hywan a=Hywan

Extracted from #1018.

This PR implements `TryFrom` for `Value`. It is required to support dynamically-typed values for polymorphic host functions.

This PR also refactors the code by using a macro (`value_conversions!`) to implement `From` and `TryFrom` in one shot.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
Co-authored-by: Ivan Enderlin <ivan.enderlin@wanadoo.fr>
2020-02-18 09:14:40 +00:00
e9333c5790 Merge branch 'master' into feat-runtime-core-value-try-from 2020-02-18 10:01:03 +01:00
cc93f3197b Merge branch 'master' into feat-interface-types-encoders-binary 2020-02-18 09:57:29 +01:00
c005f94a55 Add clippy::missing_safety_doc lint to wasi, misc clean up 2020-02-17 15:15:04 -08:00
abd44e9fba Merge branch 'master' into feat-runtime-core-cleanup-typed-func 2020-02-17 13:00:13 -08:00
8d31f0b7e9 Merge branch 'master' into feat-runtime-core-wasm-extern-type-macros 2020-02-17 20:57:27 +01:00
adc651def6 Merge #1224
1224: fix(runtime-core) Remove warnings r=Hywan a=Hywan

Because we can use the `impl_traits!` macro with only one identifier,
a warning is emitted saying the parenthesis are useless for this
specific usecase. They are required for all the other usecases
though. We can safely ignore this warning.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
Co-authored-by: Ivan Enderlin <ivan.enderlin@wanadoo.fr>
2020-02-17 19:34:57 +00:00
7f0e220f70 Merge branch 'master' into fix-runtime-core-warnings 2020-02-17 20:34:05 +01:00
8d8a5f6d5a Merge branch 'master' into feat-runtime-core-cleanup-typed-func 2020-02-17 20:33:35 +01:00
1158951d5c Merge #1221
1221: doc(interface-types) Add a `README.md` file r=MarkMcCaskey a=Hywan

Just a small `README.md`, so that users aren't totally loss.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-02-17 19:15:58 +00:00
ed826cb389 Cleanup various FIXMEs and remove protect_unix. 2020-02-18 02:35:19 +08:00
9013d52ea4 doc(runtime-core) Hide some traits and structs in the documentation.
Those are not necessary for the user. It's only internal
implementation, that must be public because it ends up in public
types, but the compiler infers everything automatically.
2020-02-17 16:03:54 +01:00
ad77803243 fix(runtime-core) Rename ExternalFunction to HostFunction. 2020-02-17 16:02:23 +01:00
533609ff70 chore(runtime-core) Move one statement to be closer to the definition. 2020-02-17 16:01:01 +01:00
2ee1e80f3b feat(runtime-core) Allow dynamic signature for polymorphic host functions.
This patch adds a new field in `Func`: `signature`. It contains the
signature of the host function.

For non-polymorphic host functions, the signature is computed from the
`Args` and `Rets` implementation parameters at compile-time.

For polymorphic host functions though, to be fully dynamic, the
signature given to `new_polymorphic` is used in `Func` as the correct
signature.
2020-02-17 15:50:12 +01:00
ad20a008e0 fix(runtime-core) Use explicit dyn for trait objects. 2020-02-17 15:30:25 +01:00
ff154999f3 fix(runtime-core) Remove warnings.
Because we can use the `impl_traits!` macro with only one identifier,
a warning is emitted saying the parenthesis are useless for this
specific usecase. They are required for all the other usecases
though. We can safely ignore this warning.
2020-02-17 15:20:21 +01:00
1d1ffcc10a feat(runtime-core) Implement TryFrom<native_type> for Value. 2020-02-17 14:56:43 +01:00
9088f6b9e2 feat(runtime-core) Simplify WasmExternType implementations with macros. 2020-02-17 14:53:09 +01:00
d6cd1fa6c4 doc(interface-types) Add a README.md file. 2020-02-17 14:48:58 +01:00
306d19274b test(interface-types) Test roundtrip: AST to binary to AST. 2020-02-17 13:55:59 +01:00
8736f0548e test(interface-types) Fix one bug and write the test suite. 2020-02-17 13:55:59 +01:00
1149158589 feat(interface-types) Add the binary encoder. 2020-02-17 13:55:59 +01:00
a21cf6d4c3 Added link to a custom ABI example repo
https://github.com/wasmerio/wasmer-rust-customabi-example
2020-02-16 12:48:20 -08:00
7b0f7ee55e Merge remote-tracking branch 'origin/master' into feature/polymorphic-v2 2020-02-16 00:39:27 +08:00
5f4561e5ef Fix compilation error on Aarch64. 2020-02-16 00:28:43 +08:00
923e4ac83a Add command line flag, make debug crate optional, clean up API 2020-02-14 12:34:25 -08:00
23275d07f6 Improve clif verifier error message 2020-02-14 11:45:11 -08:00
5e3147db08 Enable clif verifier in debug mode, fix issue with verifier 2020-02-14 11:32:49 -08:00
12373bb872 Func::new_polymorphic 2020-02-15 01:31:49 +08:00
2fe6e6f039 Global trampoline buffer. 2020-02-15 01:31:33 +08:00
0c4c9107d5 fix(interface-types) Remove a dbg! macro. 2020-02-14 12:19:29 +01:00
c8e3a0925b Merge branch 'master' into feature/changed-memory-view 2020-02-13 16:04:43 -08:00
7a45bd8a39 Merge branch 'master' into fix/isatty 2020-02-13 10:42:09 -08:00
61c85b3fbf Improved fd_write debugging 2020-02-13 10:35:48 -08:00
c287170166 Fixed wasi isatty tests when being generated 2020-02-13 10:33:27 -08:00
c697e6812f Merge branch 'master' into feat-interface-types 2020-02-13 14:40:46 +01:00
7f8d9165d4 fix(interface-types) Clean up cargo features. 2020-02-13 14:38:05 +01:00
eb2f9db230 feat(interface-types) Forbids unsafe code. 2020-02-13 14:36:17 +01:00
9559747394 doc(interface-types) Add #[deny(missing_docs)]. 2020-02-13 14:34:45 +01:00
ae6e26158f chore(interface-types) Simplify code. 2020-02-13 14:26:50 +01:00