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.
This commit is contained in:
Dan Gohman
2018-11-30 16:50:05 -08:00
parent 099f85f821
commit fe1643733b
10 changed files with 355 additions and 66 deletions

View File

@@ -33,8 +33,6 @@
extern crate cranelift_codegen;
extern crate cranelift_entity;
extern crate cranelift_wasm;
#[macro_use]
extern crate memoffset;
#[cfg(not(feature = "std"))]
#[macro_use]
extern crate alloc;
@@ -43,7 +41,7 @@ mod compilation;
mod environ;
mod module;
mod tunables;
mod vmcontext;
mod vmoffsets;
pub use compilation::{
compile_module, Compilation, RelocSink, Relocation, RelocationTarget, Relocations,