brson / miri

An experimental compiler from Rust to WebAssembly (inactive - do not use)
Apache License 2.0
209 stars 15 forks source link

Run and validate tests under V8 #42

Closed eholk closed 8 years ago

eholk commented 8 years ago

This change still runs tests using the Binaryen interpreter, but now on Linux it will also run under V8 using binaries downloaded from https://wasm-stat.us/

Obviously this includes changes to compiletest.rs to save the intermediate .wasm files and then run these through V8.

The other significant addition is rustrt.js, which is a place where we can implement support functions in JavaScript that are needed to implement various Rust things. It's not terribly well designed right now, but it's a start.

The way startup works now is that __wasm_start gets exported from the Wasm module as rust_entry, which is called by V8. With this change, it might actually make sense to bring __wasm_start out into the JS code, and just have it call directly into the Rust start function.

lqd commented 8 years ago

As I don't have a linux box to test this, @brson I'll let you look at this :)

brson commented 8 years ago

Thanks @eholk!