summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-04-23 22:44:33 -0400
committerGitHub <noreply@github.com>2019-04-23 22:44:33 -0400
commit7488a367af199dc61992bdd3451a4016bb0f0f5f (patch)
treed93c0db58acb5c29c8cf6b73998e8cdcfb2e1396
parent84d00355e8b288a0700ea1590897b75297ec3877 (diff)
parent008c9a70a57f0448b275179bfbc10c8750f29069 (diff)
Merge pull request #56555 from matthewbauer/wasm
Initial WebAssembly/WASI cross-compilation support
-rw-r--r--lib/systems/default.nix7
-rw-r--r--lib/systems/doubles.nix3
-rw-r--r--lib/systems/examples.nix14
-rw-r--r--lib/systems/for-meta.nix1
-rw-r--r--lib/systems/inspect.nix1
-rw-r--r--lib/systems/parse.nix4
-rw-r--r--pkgs/build-support/bintools-wrapper/default.nix3
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix4
-rw-r--r--pkgs/development/compilers/llvm/8/compiler-rt.nix4
-rw-r--r--pkgs/development/compilers/llvm/8/default.nix4
-rw-r--r--pkgs/development/compilers/llvm/8/libc++/default.nix17
-rw-r--r--pkgs/development/compilers/llvm/8/libc++abi.nix19
-rw-r--r--pkgs/development/compilers/llvm/8/libcxxabi-no-threads.patch12
-rw-r--r--pkgs/development/compilers/llvm/8/libcxxabi-wasm.patch16
-rw-r--r--pkgs/development/interpreters/wasmtime/cargo-lock.patch1481
-rw-r--r--pkgs/development/interpreters/wasmtime/default.nix31
-rw-r--r--pkgs/development/libraries/gmp/6.x.nix3
-rw-r--r--pkgs/development/libraries/gnu-config/default.nix8
-rw-r--r--pkgs/development/libraries/wasilibc/default.nix29
-rw-r--r--pkgs/stdenv/cross/default.nix5
-rw-r--r--pkgs/stdenv/generic/default.nix2
-rw-r--r--pkgs/test/cross/default.nix9
-rw-r--r--pkgs/top-level/all-packages.nix11
-rw-r--r--pkgs/top-level/release-cross.nix9
-rw-r--r--pkgs/top-level/static.nix12
25 files changed, 1678 insertions, 31 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index b45a5fd8d2ba..5e6d277be7d5 100644
--- a/lib/systems/default.nix
+++ b/lib/systems/default.nix
@@ -30,6 +30,7 @@ rec {
libc =
/**/ if final.isDarwin then "libSystem"
else if final.isMinGW then "msvcrt"
+ else if final.isWasi then "wasilibc"
else if final.isMusl then "musl"
else if final.isUClibc then "uclibc"
else if final.isAndroid then "bionic"
@@ -62,7 +63,7 @@ rec {
"netbsd" = "NetBSD";
"freebsd" = "FreeBSD";
"openbsd" = "OpenBSD";
- "wasm" = "Wasm";
+ "wasi" = "Wasi";
}.${final.parsed.kernel.name} or null;
# uname -p
@@ -114,8 +115,8 @@ rec {
then "${wine}/bin/${wine-name}"
else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux
then "${qemu-user}/bin/qemu-${final.qemuArch}"
- else if final.isWasm
- then "${pkgs.v8}/bin/d8"
+ else if final.isWasi
+ then "${pkgs.wasmtime}/bin/wasmtime"
else throw "Don't know how to run ${final.config} executables.";
} // mapAttrs (n: v: v final.parsed) inspect.predicates
diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix
index 2cf06b6ac1c8..c6877ebef0bc 100644
--- a/lib/systems/doubles.nix
+++ b/lib/systems/doubles.nix
@@ -17,6 +17,8 @@ let
"x86_64-netbsd" "x86_64-openbsd" "x86_64-solaris"
"x86_64-windows" "i686-windows"
+
+ "wasm64-wasi" "wasm32-wasi"
];
allParsed = map parse.mkSystemFromString all;
@@ -45,6 +47,7 @@ in rec {
netbsd = filterDoubles predicates.isNetBSD;
openbsd = filterDoubles predicates.isOpenBSD;
unix = filterDoubles predicates.isUnix;
+ wasi = filterDoubles predicates.isWasi;
windows = filterDoubles predicates.isWindows;
mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "armv7a-linux" "aarch64-linux" "powerpc64le-linux"];
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index 1a5b80449bf2..94c7cfd7570f 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -116,7 +116,7 @@ rec {
config = "aarch64-none-elf";
libc = "newlib";
};
-
+
aarch64be-embedded = {
config = "aarch64_be-none-elf";
libc = "newlib";
@@ -126,7 +126,7 @@ rec {
config = "powerpc-none-eabi";
libc = "newlib";
};
-
+
ppcle-embedded = {
config = "powerpcle-none-eabi";
libc = "newlib";
@@ -211,4 +211,14 @@ rec {
config = "x86_64-unknown-netbsd";
libc = "nblibc";
};
+
+ #
+ # WASM
+ #
+
+ wasi32 = {
+ config = "wasm32-unknown-wasi";
+ useLLVM = true;
+ };
+
}
diff --git a/lib/systems/for-meta.nix b/lib/systems/for-meta.nix
index 51fb6ae760d1..17ae94deb7d1 100644
--- a/lib/systems/for-meta.nix
+++ b/lib/systems/for-meta.nix
@@ -32,6 +32,7 @@ in rec {
openbsd = [ patterns.isOpenBSD ];
unix = patterns.isUnix; # Actually a list
windows = [ patterns.isWindows ];
+ wasi = [ patterns.isWasi ];
inherit (lib.systems.doubles) mesaPlatforms;
}
diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix
index f8d5ca84d7aa..1c90af88879a 100644
--- a/lib/systems/inspect.nix
+++ b/lib/systems/inspect.nix
@@ -43,6 +43,7 @@ rec {
isWindows = { kernel = kernels.windows; };
isCygwin = { kernel = kernels.windows; abi = abis.cygnus; };
isMinGW = { kernel = kernels.windows; abi = abis.gnu; };
+ isWasi = { kernel = kernels.wasi; };
isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ];
isMusl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ];
diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix
index cd0a11c058e6..7f5912a13a75 100644
--- a/lib/systems/parse.nix
+++ b/lib/systems/parse.nix
@@ -226,6 +226,7 @@ rec {
elf = {};
macho = {};
pe = {};
+ wasm = {};
unknown = {};
};
@@ -268,6 +269,7 @@ rec {
none = { execFormat = unknown; families = { }; };
openbsd = { execFormat = elf; families = { inherit bsd; }; };
solaris = { execFormat = elf; families = { }; };
+ wasi = { execFormat = wasm; families = { }; };
windows = { execFormat = pe; families = { }; };
} // { # aliases
# 'darwin' is the kernel for all of them. We choose macOS by default.
@@ -376,6 +378,8 @@ rec {
then { cpu = elemAt l 0; kernel = elemAt l 1; abi = elemAt l 2; }
else if (elemAt l 2 == "mingw32") # autotools breaks on -gnu for window
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "windows"; }
+ else if (elemAt l 2 == "wasi")
+ then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "wasi"; }
else if hasPrefix "netbsd" (elemAt l 2)
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; }
else if (elem (elemAt l 2) ["eabi" "eabihf" "elf"])
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix
index 964ff1175538..e1ec09bc95a1 100644
--- a/pkgs/build-support/bintools-wrapper/default.nix
+++ b/pkgs/build-support/bintools-wrapper/default.nix
@@ -191,7 +191,8 @@ stdenv.mkDerivation {
else if targetPlatform.isAvr then "avr"
else if targetPlatform.isAlpha then "alpha"
else throw "unknown emulation for platform: ${targetPlatform.config}";
- in targetPlatform.platform.bfdEmulation or (fmt + sep + arch);
+ in if targetPlatform.useLLVM or false then ""
+ else targetPlatform.platform.bfdEmulation or (fmt + sep + arch);
strictDeps = true;
depsTargetTargetPropagated = extraPackages;
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index 91948f415714..84548a6b1dfb 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -347,6 +347,10 @@ stdenv.mkDerivation {
hardening_unsupported_flags+=" stackprotector fortify"
''
+ + optionalString targetPlatform.isWasm ''
+ hardening_unsupported_flags+=" stackprotector fortify pie pic"
+ ''
+
+ optionalString (libc != null && targetPlatform.isAvr) ''
for isa in avr5 avr3 avr4 avr6 avr25 avr31 avr35 avr51 avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 tiny-stack; do
echo "-B${getLib libc}/avr/lib/$isa" >> $out/nix-support/libc-cflags
diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix
index 47c8b7bd59f5..2b591cc94aff 100644
--- a/pkgs/development/compilers/llvm/8/compiler-rt.nix
+++ b/pkgs/development/compilers/llvm/8/compiler-rt.nix
@@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+ #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
+ "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
"-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
@@ -53,7 +55,7 @@ stdenv.mkDerivation rec {
'';
# Hack around weird upsream RPATH bug
- postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
+ postInstall = stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
ln -s "$out/lib"/*/* "$out/lib"
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
diff --git a/pkgs/development/compilers/llvm/8/default.nix b/pkgs/development/compilers/llvm/8/default.nix
index 3503e6b83d2e..48cf9e5e589c 100644
--- a/pkgs/development/compilers/llvm/8/default.nix
+++ b/pkgs/development/compilers/llvm/8/default.nix
@@ -97,13 +97,17 @@ let
targetLlvmLibraries.libcxx
targetLlvmLibraries.libcxxabi
targetLlvmLibraries.compiler-rt
+ ] ++ stdenv.lib.optionals (!stdenv.targetPlatform.isWasm) [
targetLlvmLibraries.libunwind
];
extraBuildCommands = ''
echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+ '' + stdenv.lib.optionalString (!stdenv.targetPlatform.isWasm) ''
echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+ '' + stdenv.lib.optionalString stdenv.targetPlatform.isWasm ''
+ echo "-fno-exceptions" >> $out/nix-support/cc-cflags
'' + mkExtraBuildCommands cc;
};
diff --git a/pkgs/development/compilers/llvm/8/libc++/default.nix b/pkgs/development/compilers/llvm/8/libc++/default.nix
index d0a5c37c4148..3d67c37dcdd7 100644
--- a/pkgs/development/compilers/llvm/8/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/8/libc++/default.nix
@@ -1,4 +1,5 @@
-{ lib, stdenv, fetch, cmake, python, libcxxabi, fixDarwinDylibNames, version }:
+{ lib, stdenv, fetch, cmake, python, libcxxabi, fixDarwinDylibNames, version
+, enableShared ? true }:
stdenv.mkDerivation rec {
name = "libc++-${version}";
@@ -22,7 +23,8 @@ stdenv.mkDerivation rec {
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
patchShebangs utils/cat_files.py
'';
- nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python;
+ nativeBuildInputs = [ cmake ]
+ ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python;
buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
@@ -30,8 +32,13 @@ stdenv.mkDerivation rec {
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
"-DLIBCXX_LIBCPPABI_VERSION=2"
"-DLIBCXX_CXX_ABI=libcxxabi"
- ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1"
- ++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON";
+ ] ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+ ++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
+ ++ stdenv.lib.optional stdenv.hostPlatform.isWasm [
+ "-DLIBCXX_ENABLE_THREADS=OFF"
+ "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+ "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+ ] ++ stdenv.lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
enableParallelBuilding = true;
@@ -46,6 +53,6 @@ stdenv.mkDerivation rec {
homepage = http://libcxx.llvm.org/;
description = "A new implementation of the C++ standard library, targeting C++11";
license = with stdenv.lib.licenses; [ ncsa mit ];
- platforms = stdenv.lib.platforms.unix;
+ platforms = stdenv.lib.platforms.all;
};
}
diff --git a/pkgs/development/compilers/llvm/8/libc++abi.nix b/pkgs/development/compilers/llvm/8/libc++abi.nix
index 0eb5ebca5159..bb5b368267f2 100644
--- a/pkgs/development/compilers/llvm/8/libc++abi.nix
+++ b/pkgs/development/compilers/llvm/8/libc++abi.nix
@@ -1,4 +1,5 @@
-{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version }:
+{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version
+, enableShared ? true }:
stdenv.mkDerivation {
name = "libc++abi-${version}";
@@ -6,13 +7,20 @@ stdenv.mkDerivation {
src = fetch "libcxxabi" "1k875f977ybdkpdnr9105wa6hccy9qvpd9xd42n75h7p56bdxmn2";
nativeBuildInputs = [ cmake ];
- buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
+ buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+ ] ++ stdenv.lib.optionals stdenv.hostPlatform.isWasm [
+ "-DLIBCXXABI_ENABLE_THREADS=OFF"
+ "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+ ] ++ stdenv.lib.optionals (!enableShared) [
+ "-DLIBCXXABI_ENABLE_SHARED=OFF"
];
+ patches = [ ./libcxxabi-no-threads.patch ];
+
postUnpack = ''
unpackFile ${libcxx.src}
unpackFile ${llvm.src}
@@ -21,6 +29,8 @@ stdenv.mkDerivation {
export TRIPLE=x86_64-apple-darwin
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch}
+ '' + stdenv.lib.optionalString stdenv.hostPlatform.isWasm ''
+ patch -p1 -d $(ls -d llvm-*) -i ${./libcxxabi-wasm.patch}
'';
installPhase = if stdenv.isDarwin
@@ -39,8 +49,9 @@ stdenv.mkDerivation {
else ''
install -d -m 755 $out/include $out/lib
install -m 644 lib/libc++abi.a $out/lib
- install -m 644 lib/libc++abi.so.1.0 $out/lib
install -m 644 ../include/cxxabi.h $out/include
+ '' + stdenv.lib.optionalString enableShared ''
+ install -m 644 lib/libc++abi.so.1.0 $out/lib
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
'';
@@ -50,6 +61,6 @@ stdenv.mkDerivation {
description = "A new implementation of low level support for a standard C++ library";
license = with stdenv.lib.licenses; [ ncsa mit ];
maintainers = with stdenv.lib.maintainers; [ vlstill ];
- platforms = stdenv.lib.platforms.unix;
+ platforms = stdenv.lib.platforms.all;
};
}
diff --git a/pkgs/development/compilers/llvm/8/libcxxabi-no-threads.patch b/pkgs/development/compilers/llvm/8/libcxxabi-no-threads.patch
new file mode 100644
index 000000000000..787f3e16500e
--- /dev/null
+++ b/pkgs/development/compilers/llvm/8/libcxxabi-no-threads.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4138acf..41b4763 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -362,6 +362,7 @@ if (NOT LIBCXXABI_ENABLE_THREADS)
+ " is also set to ON.")
+ endif()
+ add_definitions(-D_LIBCXXABI_HAS_NO_THREADS)
++ add_definitions(-D_LIBCPP_HAS_NO_THREADS)
+ endif()
+
+ if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)
diff --git a/pkgs/development/compilers/llvm/8/libcxxabi-wasm.patch b/pkgs/development/compilers/llvm/8/libcxxabi-wasm.patch
new file mode 100644
index 000000000000..4ebfe46aa813
--- /dev/null
+++ b/pkgs/development/compilers/llvm/8/libcxxabi-wasm.patch
@@ -0,0 +1,16 @@
+diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
+index 15497d405e0..33f7f18193a 100644
+--- a/cmake/modules/HandleLLVMOptions.cmake
++++ b/cmake/modules/HandleLLVMOptions.cmake
+@@ -127,7 +127,10 @@ else(WIN32)
+ set(LLVM_HAVE_LINK_VERSION_SCRIPT 1)
+ endif()
+ else(FUCHSIA OR UNIX)
+- MESSAGE(SEND_ERROR "Unable to determine platform")
++ if(${CMAKE_SYSTEM_NAME} MATCHES "Wasi")
++ else()
++ MESSAGE(SEND_ERROR "Unable to determine platform")
++ endif()
+ endif(FUCHSIA OR UNIX)
+ endif(WIN32)
+
diff --git a/pkgs/development/interpreters/wasmtime/cargo-lock.patch b/pkgs/development/interpreters/wasmtime/cargo-lock.patch
new file mode 100644
index 000000000000..be5bd0ab3d3e
--- /dev/null
+++ b/pkgs/development/interpreters/wasmtime/cargo-lock.patch
@@ -0,0 +1,1481 @@
+diff --git a/Cargo.lock b/Cargo.lock
+new file mode 100644
+index 0000000..f702de1
+--- /dev/null
++++ b/Cargo.lock
+@@ -0,0 +1,1475 @@
++[[package]]
++name = "aho-corasick"
++version = "0.7.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "ansi_term"
++version = "0.11.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "arrayvec"
++version = "0.4.10"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "atty"
++version = "0.2.11"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
++ "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
++ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "autocfg"
++version = "0.1.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++
++[[package]]
++name = "backtrace"
++version = "0.3.15"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
++ "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
++ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
++ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
++ "rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
++ "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "backtrace-sys"
++version = "0.1.28"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
++ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "bindgen"
++version = "0.49.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
++ "cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
++ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
++ "clang-sys 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
++ "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
++ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
++ "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
++ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
++ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
++ "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
++ "shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
++ "which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "bitflags"
++version = "1.0.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++
++[[package]]
++name = "byteorder"
++version = "1.3.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++
++[[package]]
++name = "capstone"
++version = "0.5.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "capstone-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "capstone-sys"
++version = "0.9.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "cast"
++version = "0.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++
++[[package]]
++name = "cc"
++version = "1.0.35"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++
++[[package]]
++name = "cexpr"
++version = "0.3.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "cfg-if"
++version = "0.1.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++
++[[package]]
++name = "chrono"
++version = "0.4.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
++ "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
++ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "clang-sys"
++version = "0.28.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
++ "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
++ "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "clap"
++version = "2.33.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
++ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
++ "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
++ "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "cloudabi"
++version = "0.0.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "cmake"
++version = "0.1.38"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "cranelift-bforest"
++version = "0.30.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "cranelift-entity 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "cranelift-codegen"
++version = "0.30.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "cranelift-bforest 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "cranelift-codegen-meta 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "cranelift-entity 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
++ "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
++ "hashmap_core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
++ "target-lexicon 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "cranelift-codegen-meta"
++version = "0.30.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "cranelift-entity 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "cranelift-entity"
++version = "0.30.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++
++[[package]]
++name = "cranelift-frontend"
++version = "0.30.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "cranelift-codegen 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "hashmap_core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
++ "target-lexicon 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "cranelift-native"
++version = "0.30.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "cranelift-codegen 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "raw-cpuid 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "target-lexicon 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "cranelift-wasm"
++version = "0.30.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
++ "cranelift-codegen 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "cranelift-entity 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "cranelift-frontend 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
++ "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
++ "hashmap_core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
++ "wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "crossbeam-deque"
++version = "0.2.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
++ "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "crossbeam-epoch"
++version = "0.3.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
++ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
++ "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
++ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
++ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
++ "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "crossbeam-utils"
++version = "0.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "docopt"
++version = "1.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
++ "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)",
++ "strsim 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
++]
++
++[[package]]
++name = "dynasm"
++version = "0.3.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++dependencies = [
++ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
++ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
++ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
++ "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
++ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",