Commit Graph

28 Commits

Author SHA1 Message Date
Jakub Konka
e8142f076d Migrate to wasi-common crate 2019-06-03 13:23:07 -07:00
bjorn3
3ae7c60b13 Update src/wasmtime.rs
Fix spelling error.

Co-Authored-By: sunfishcode <sunfish@mozilla.com>
2019-03-27 10:58:43 -07:00
Dan Gohman
b2fefe7714 WASI prototype design, implementation, and documentation.
This adds documents describing the WASI Core API, and an implementation in
Wasmtime.
2019-03-27 10:58:43 -07:00
Yury Delendik
ddbc00752e Generate debug info for LLDB/GDB (#50)
* Transform DWARF sections into native format for wasm2obj and wasmtime.

Generate DWARF sections based on WASM DWARF.
Ignore some of debug_info/debug_line for dead code.

* Fix test
2019-03-06 16:03:32 -08:00
Dan Gohman
04d4b20df4 Fix clippy.toml paths and a few clippy lints. 2019-03-01 15:49:29 -08:00
Dan Gohman
5f201f6d73 Rename Instance to InstanceHandle. 2019-02-26 08:54:36 -08:00
Dan Gohman
077ee717a8 Make Instance a refcounting handle around InstanceContents. 2019-02-26 08:54:36 -08:00
Dan Gohman
ddb8453b0d Move wasmtime's instantiation test into a separate file. 2019-02-01 18:20:59 -08:00
Dan Gohman
72ee874986 Factor out a function for reading a wasm file. 2019-02-01 18:20:59 -08:00
Dan Gohman
8b140cc748 Create a Context class to group together various state objects. 2019-02-01 18:20:59 -08:00
Dan Gohman
00a4e93bcd Add a concept of "global exports".
This adds a feature which allows one to look up an export by name
without knowing what module it's in -- `lookup_global_export` on an
`InstanceContents`.

The main expected use for this is to support APIs where module A
imports a function from module B, and module B needs to access module
A's memory. B can't import it from A in the normal way, because that
would create a dependency cycle. So for now, allow B to look up A's
exported memory dynamically with `lookup_global_export`.

In the future, with reference types and possibly host bindings, we'll be
able to pass references to memory as arguments, which will obviate the
need for this mechanism.
2019-01-22 16:32:07 -08:00
Dan Gohman
f6c2fe7d2d Update to Rust 2018 Edition. 2019-01-03 12:58:11 -08:00
Dan Gohman
529de7ca60 Tidy up unneeded '&'s. 2019-01-03 12:03:52 -08:00
Dan Gohman
7592c99f3b Refactor the compilation and instantiation pipeline.
wasmtime-execute is now wasmtime-jit. Move `JITCode` and the TargetIsa
into a new `Compiler` type. `InstancePlus` is no more, with trampoline
functionality now handled by `Compiler`.
2019-01-03 11:47:55 -08:00
Dan Gohman
450a279e18 Rename wasmtime's logfile names. 2019-01-03 11:47:40 -08:00
Dan Gohman
a5a23d8c4a Factor WasmNamespace out of lib/wast and into lib/execute as Namespace.
This makes it usable for things other than just wast tests.
2018-12-24 22:08:36 -08:00
Dan Gohman
3f24098edc Implement the remaining valid spec tests.
And lots of other miscellaneous changes. Rename InstanceWorld to
InstancePlus and reorganize its contents. This still isn't a great name,
but at least now it has a clear purpose.
2018-12-12 11:49:02 -08:00
Dan Gohman
56850d481d Initial support for function, table, memory, and global imports. 2018-12-11 12:49:14 -08:00
Dan Gohman
7dcca6be5b Improve error handling, and start refactoring Instance.
Introduce proper error handling in several places, and perform a first
pass at refactoring Instance to make it easier to use.
2018-12-07 23:51:23 -05:00
Dan Gohman
fe562297a7 Rename wasmtime's --function to --invoke.
This highlights the similarity with the `invoke` command in `wast` files.
2018-12-07 06:25:23 -05:00
Dan Gohman
a635861425 Report traps in functions invoked from the command line. 2018-12-06 23:56:45 -05:00
Dan Gohman
dca7729313 Improve error handling and misc cleanups. 2018-12-06 23:03:12 -05:00
Dan Gohman
08488591a9 Fix clippy warning namespaces. 2018-12-06 23:02:42 -05:00
Dan Gohman
d9b4bd1de8 Support imports. 2018-12-06 23:02:19 -05:00
Dan Gohman
8170a9db79 Update to the rustfmt in rust 1.31, which is now stable. 2018-12-06 22:59:46 -05:00
Dan Gohman
04b7f0c0df Fix the description of the wasmtime program. 2018-12-05 02:25:34 -05:00
Dan Gohman
bd69768e0d Improve infrastructure.
Do more encapsulation of raw pointers, use more PrimaryMaps instead of
Vecs, add a table.rs for managing table storage.
2018-12-05 02:25:34 -05:00
Dan Gohman
099f85f821 Rename main.rs to wasmtime.rs. 2018-12-05 02:25:34 -05:00