Use generated type bindings (#152)

* Use generated type bindings.

Use the witx API descriptions to generate the bulk of the contents of
host.rs, wasi.rs, and wasi32.rs.

This also prunes out many of the miscellaneous libc definitions from
those files which aren't currently in use by wasi-common. If there's
anything removed that's still needed by someone, it's easy to add things
back in.

* Remove unneeded iovec conversion routines.
This commit is contained in:
Dan Gohman
2019-11-05 14:56:18 -08:00
committed by GitHub
parent f4ac1299b2
commit 8ebe12f553
17 changed files with 752 additions and 943 deletions

20
wig/Cargo.toml Normal file
View File

@@ -0,0 +1,20 @@
[package]
name = "wig"
version = "0.0.0"
authors = ["Dan Gohman <sunfish@mozilla.com>"]
edition = "2018"
categories = ["wasm"]
keywords = ["webassembly", "wasm"]
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/CraneStation/wasi-common"
[lib]
proc-macro = true
[dependencies]
quote = "1.0.2"
proc-macro2 = "1.0.6"
# We include the WASI repo primarily for the witx files, but it's also useful
# to use the witx parser it contains, rather than the witx crate from
# crates.io, so that it always matches the version of the witx files.
witx = { path = "../WASI/tools/witx" }