Reorganize host.rs and wasm32.rs. (#151)
* Reorganize host.rs and wasm32.rs. Reorganize host.rs and wasm32.rs into host.rs, wasi.rs, and wasi32.rs. Most of the contents of host.rs was not actually host-specific, as most of the types are fixed-size types like u32 or i64. These types are now in wasi.rs. The few types which do have pointer or usize-sized values now remain, in two versions: host.rs has versions which use actual raw pointers and usize, and wasi32.rs has versions which use u32 to represent them. * Fix compilation on BSD * Fix compilation on Windows * Fully encapsulate endianness in memory.rs. This refactors memory.rs to fully encapsulte endianness concerns, so that outside that file, all values are in host-endian order. This adds a dependency on the `num` crate, though it's only used for the `PrimInt` trait, for handling endianness in a generic way. * Use pub(crate).
This commit is contained in:
@@ -28,6 +28,7 @@ cfg-if = "0.1.9"
|
||||
log = "0.4"
|
||||
filetime = "0.2.7"
|
||||
lazy_static = "1.4.0"
|
||||
num = { version = "0.2.0", default-features = false }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
nix = "0.15"
|
||||
|
||||
Reference in New Issue
Block a user