* Simple module compilation cache
* Fix base64 encoding bug
* Use warn! everywhere in cache system
* Remove unused import
* Temporary workaround for long path on Windows
* Remove unused import for non-windows builds
* Add command line argument to enable cache system + apply minor review feedback
Even though this somehow passed on Travis on [the
PR](https://github.com/CraneStation/wasmtime/pull/209), it fails on
Travis on master, and I can reproduce the failure.
The failure is on spec_testsuite/names.wast:
```
$ RUST_BACKTRACE=1 target/debug/wast spec_testsuite/names.wast
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: FromUtf8Error { bytes: [255], error: Utf8Error { valid_up_to: 0, error_len: Some(1) } }', src/libcore/result.rs:999:5
stack backtrace:
[...]
9: core::result::Result<T,E>::unwrap
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libcore/result.rs:800
10: wabt::script::jstring_to_rstring
at [...]/.cargo/registry/src/github.com-1ecc6299db9ec823/wabt-0.8.0/src/script/mod.rs:261
11: wabt::script::parse_action
at [...]/.cargo/registry/src/github.com-1ecc6299db9ec823/wabt-0.8.0/src/script/mod.rs:274
12: wabt::script::ScriptParser<F32,F64>::next
at [...]/.cargo/registry/src/github.com-1ecc6299db9ec823/wabt-0.8.0/src/script/mod.rs:504
13: wasmtime_wast::wast::WastContext::run_buffer
at wasmtime-wast/src/wast.rs:202
14: wasmtime_wast::wast::WastContext::run_file
at wasmtime-wast/src/wast.rs:472
15: wast::main
at src/wast.rs:107
[...]
```
* Rewrite FdEntry reusing as much libstd as possible
* Use the new FdEntry, FdObject, Descriptor struct in *nix impl
* Adapt Windows impl
* Remove unnecessary check in fd_read
Check `host_nread == 0` caused premature FdEntry closure and removal
which ultimately was resulting in an attempt at "double closing" of
the same file descriptor at the end of the Wasm program:
...
fd_close(fd=4)
-> errno=WASI_ESUCCESS
fd_close(fd=4)
-> errno=WASI_EBADF
* Use libstd vectored IO
* Use std:🧵:yield_now to implement sched_yield
* Add logging to integration tests
* Add preliminary support for host-specific errors
* Operate on std::fs::File in path_get on *nix
* Add cross-platform RawString type encapsulating OsStrExt
* Fix Windows build
* Update Travis and README to Rust v1.36
* Remove unused winx::handle::close helper
* Refactor Descriptor into raw handles/fds
* Strip readlinkat in prep for path_get host-independent
* Strip openat in prep for path_get host-independent
* Move ManuallyDrop up one level from Descriptor to FdObject
* Make (c)iovec host fns unsafe
* Swap unwraps/expects for Results in fdentry_impl on nix
* Rewrite fd_pread/write and implement for Win
* Use File::sync_all to impl fd_sync
* Use File::sync_data to impl fd_datasync
* Rewind file cursor after fd_p{read, write} on Windows
* Add fd_p{read, write} tests
* Handle errors instead of panicking in path_get
* Use File::set_len to impl fd_allocate
* Add test for fd_allocate
* Replace all panics with Results
* Document the point of RawString
* Add partial impl of determine_type_rights fn
* Add draft of fd_fdstat_get hostcall
* Add writev wrapper for writing IoVec in RawHandle
* Move IoVec and writev to separate helper crate
* Add Win error handling
Clean up closing and duplicating RawHandle
* Wrap Win file type result
* Add draft impl of fd_close and fd_read
* Refactor getting file access rights
* Remove winapi from the main Cargo.toml
* Add very rough draft of open_path (very incomplete)
* Clean up WinError with macro
* Ignore dir handle in openat if path absolute
* Decode oflags and advance open_path hostcall
* Clean up AccessRight and FlagsAndAttributes flags
* Implement path_get (without symlink expansion yet!)
* Add ShareMode and fix path_get for nested paths
* Add some error mappings between Win and WASI
* Clean up fdflags conversions
* Fix sharing violation when calling openat at '.'
* Apply Alex's fix of using ManuallyDrop instead forget
* Clean up
* Explicitly specify workspace to avoid comp errors at tests
Now, test binaries are bundled with the repo, and
just like in CraneStation/wasmtime, the test cases
are generated automatically using build.rs. So all
it takes is to drop a new test binary in the
testsuite dir to get the test case for it generated
(with some caveats to do with handling preopens).
This adds the C WASI implementation as a new crate, wasmtime-wasi-c,
and adds a command-line flag to the wasmtime command-line driver to
select which WASI implementation to use.
* 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