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
6dd39dee6a
Update to Cranelift 0.26.0.
2018-12-11 13:21:03 -08:00
Dan Gohman
56850d481d
Initial support for function, table, memory, and global imports.
2018-12-11 12:49:14 -08:00
Dan Gohman
93f33141e9
Introduce VMFunctionBody to add extra type safety.
2018-12-08 21:00:42 -05:00
Dan Gohman
10bb311aea
Reorganize unsafe code.
2018-12-08 21:00:42 -05: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
3b280e8799
Update to Rust 1.31.0.
2018-12-06 23:20:16 -05:00
Dan Gohman
230079d460
Improved error handling.
2018-12-06 23:03:32 -05:00
Dan Gohman
1fda62ed33
Flesh out the README.md with more specific goals.
2018-12-06 23:03:23 -05:00
Dan Gohman
dca7729313
Improve error handling and misc cleanups.
2018-12-06 23:03:12 -05:00
Dan Gohman
6198b89110
Update to pretty_env_logger 0.3.0.
2018-12-06 23:02:57 -05:00
Dan Gohman
08488591a9
Fix clippy warning namespaces.
2018-12-06 23:02:42 -05:00
Dan Gohman
06de604729
Rename InvokeOutcome to ActionOutcome and move it to its own module.
2018-12-06 23:02:33 -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
96941a59af
Implement call_indirect signature checking.
...
The call_indirect.wast spec test now passes.
2018-12-05 11:32:35 -05:00
Dan Gohman
57635eb62b
Implement minimal call_indirect signature checking.
2018-12-05 11:32:28 -05:00
Dan Gohman
27c2f82628
Add Emacs backup and autosave files to .gitignore.
2018-12-05 11:30:05 -05:00
Dan Gohman
0a2ecf5a1e
On Darwin, guard page accesses are raised as SIGBUS.
2018-12-05 02:25:34 -05:00
Dan Gohman
cfd28a7bc5
Temporarily disable use of Mach ports for trap handling on Darwin.
2018-12-05 02:25:34 -05:00
Dan Gohman
4ae552c7bd
Reword the lib/wast README.md and add a link to the spec testsuite.
2018-12-05 02:25:34 -05:00
Dan Gohman
4db11b610e
Generalize to better support the spec proposals tests.
2018-12-05 02:25:34 -05:00
Dan Gohman
974355e20b
Handle write errors in the build script.
2018-12-05 02:25:34 -05:00
Dan Gohman
c3dd82b0d5
Enable RUST_BACKTRACE=1 when running "cargo test".
2018-12-05 02:25:34 -05:00
Dan Gohman
e06b99b165
Add a spec testsuite submodule.
2018-12-05 02:25:34 -05:00
Dan Gohman
04b7f0c0df
Fix the description of the wasmtime program.
2018-12-05 02:25:34 -05:00
Dan Gohman
7faa15d7ac
More infrastructure.
...
Improve handling of memory.grow/size, add a standalone wast runner,
test harness improvements.
2018-12-05 02:25:34 -05:00
Dan Gohman
83f8a31010
Convert the wast test harness into a crate.
...
This uses a build.rs file to collect all the wast tests and create
individual `#[test]` lines for them, so that `cargo test` can run them
in parallel.
2018-12-05 02:25:34 -05:00
Dan Gohman
4c47ce9b53
Add support for math libcalls.
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
fe1643733b
Remove use of offset_of! from wasmtime-environ.
...
wasmtime-environ is meant to support cross compilation, so it shouldn't
have dependencies on target layout of structs. This moves the layout
back into wasmtime-execute, and adds a system of asserts for checking
that wasmtime-environ's offsets stay in sync.
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
Dan Gohman
e940c97664
Tidy.
2018-12-05 02:25:34 -05:00
Dan Gohman
8dbd4b8d7c
Start a wast testing harness and add some tests.
...
This implements a minimal wast testing harness in tests/wast.rs, which
runs the wast tests under tests/wast.
It also adds tests for trapping in a variety of ways, and fixes several
bugs exposed by those tests.
2018-12-05 02:25:34 -05:00
Dan Gohman
a6b54330c0
Switch Darwin to use PC-redirection for calling the Unwind function.
2018-12-05 02:25:34 -05:00
Dan Gohman
872f7a10f4
Use MAP_ANON instead of MAP_ANONYMOUS.
2018-12-05 02:25:34 -05:00
Dan Gohman
d5ed424b33
Add tunables.rs.
2018-12-05 02:25:34 -05:00
Dan Gohman
f44fe25f9c
Rewrite linear memory handling in terms of simple mmap/VirtualAlloc.
...
The memmap crate doesn't make it straightforward to have part of the
region be writeable and part readonly. Since this is a fairly boutique
use case, and we don't need all that much code, just use the low-level
APIs directly.
Also, introduce a concept of "tunables" for adjusting the parameters of
the runtime.
2018-12-05 02:25:34 -05:00
Dan Gohman
1b98efd979
Add a README.md for lib/obj.
2018-12-04 18:24:50 -06:00
Dan Gohman
0c8348cfc7
Mention that being usable as a library is a goal.
2018-12-04 18:24:50 -06:00
Dan Gohman
4437bd1742
Add a CODE_OF_CONDUCT.nd and CONTRIBUTING.md.
2018-12-04 18:24:50 -06:00
Dan Gohman
0b039b0978
Mention the goal of prototyping syscalls for proposal to reference-sysroot.
2018-12-04 18:24:50 -06:00
Dan Gohman
3e19b13b0b
Fix typo.
2018-12-04 18:24:50 -06:00
Dan Gohman
5af15ce9dd
Update the README with project status and goals.
2018-12-04 18:24:50 -06:00
Dan Gohman
02a3684a3f
Update to bindgen 0.44.
2018-11-30 09:24:33 -08:00
Dan Gohman
4dec8ecfce
Check for cargo fmt rather than checking for rustfmt directly.
2018-11-30 10:46:15 -06:00
Frank Rehberger
ec940ee8af
Migrating to wabt::wat2wasm ( #29 )
...
* Add test_environ_translate
* Migrating to wabt::wat2wasm
2018-11-30 10:44:44 -06:00
Dan Gohman
ff25397c9e
Fix the type of the heap bound variable.
2018-11-29 19:28:35 -08:00