Merge branch 'master' into improve-exception-logging

This commit is contained in:
Syrus Akbary 2019-05-02 20:29:28 -07:00 committed by GitHub
commit c3c415fa86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 54 deletions

86
Cargo.lock generated
View File

@ -2234,20 +2234,20 @@ dependencies = [
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
"wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-clif-backend 0.3.0", "wasmer-clif-backend 0.4.0",
"wasmer-emscripten 0.3.0", "wasmer-emscripten 0.4.0",
"wasmer-llvm-backend 0.3.0", "wasmer-llvm-backend 0.4.0",
"wasmer-middleware-common 0.3.0", "wasmer-middleware-common 0.4.0",
"wasmer-runtime 0.3.0", "wasmer-runtime 0.4.0",
"wasmer-runtime-abi 0.3.0", "wasmer-runtime-abi 0.4.0",
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
"wasmer-singlepass-backend 0.3.0", "wasmer-singlepass-backend 0.4.0",
"wasmer-wasi 0.3.0", "wasmer-wasi 0.4.0",
] ]
[[package]] [[package]]
name = "wasmer-clif-backend" name = "wasmer-clif-backend"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cranelift-codegen 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-codegen 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2263,15 +2263,15 @@ dependencies = [
"serde_bytes 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "target-lexicon 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
"wasmer-win-exception-handler 0.3.0", "wasmer-win-exception-handler 0.4.0",
"wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)", "wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "wasmer-emscripten" name = "wasmer-emscripten"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2280,15 +2280,15 @@ dependencies = [
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
"wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-clif-backend 0.3.0", "wasmer-clif-backend 0.4.0",
"wasmer-llvm-backend 0.3.0", "wasmer-llvm-backend 0.4.0",
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
"wasmer-singlepass-backend 0.3.0", "wasmer-singlepass-backend 0.4.0",
] ]
[[package]] [[package]]
name = "wasmer-llvm-backend" name = "wasmer-llvm-backend"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"capstone 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "capstone 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2303,42 +2303,42 @@ dependencies = [
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
"wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
"wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)", "wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "wasmer-middleware-common" name = "wasmer-middleware-common"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
] ]
[[package]] [[package]]
name = "wasmer-runtime" name = "wasmer-runtime"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "criterion 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-clif-backend 0.3.0", "wasmer-clif-backend 0.4.0",
"wasmer-llvm-backend 0.3.0", "wasmer-llvm-backend 0.4.0",
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
"wasmer-singlepass-backend 0.3.0", "wasmer-singlepass-backend 0.4.0",
] ]
[[package]] [[package]]
name = "wasmer-runtime-abi" name = "wasmer-runtime-abi"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
"tar 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
"wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)", "wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)",
"zbox 0.6.1 (git+https://github.com/wasmerio/zbox?branch=bundle-libsodium)", "zbox 0.6.1 (git+https://github.com/wasmerio/zbox?branch=bundle-libsodium)",
"zstd 0.4.22+zstd.1.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "zstd 0.4.22+zstd.1.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2346,17 +2346,17 @@ dependencies = [
[[package]] [[package]]
name = "wasmer-runtime-c-api" name = "wasmer-runtime-c-api"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"cbindgen 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", "cbindgen 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-runtime 0.3.0", "wasmer-runtime 0.4.0",
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
] ]
[[package]] [[package]]
name = "wasmer-runtime-core" name = "wasmer-runtime-core"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"blake2b_simd 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "blake2b_simd 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2382,7 +2382,7 @@ dependencies = [
[[package]] [[package]]
name = "wasmer-singlepass-backend" name = "wasmer-singlepass-backend"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"dynasm 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "dynasm 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2392,24 +2392,24 @@ dependencies = [
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
"nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
"wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)", "wasmparser 0.29.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "wasmer-spectests" name = "wasmer-spectests"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-clif-backend 0.3.0", "wasmer-clif-backend 0.4.0",
"wasmer-llvm-backend 0.3.0", "wasmer-llvm-backend 0.4.0",
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
"wasmer-singlepass-backend 0.3.0", "wasmer-singlepass-backend 0.4.0",
] ]
[[package]] [[package]]
name = "wasmer-wasi" name = "wasmer-wasi"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"generational-arena 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "generational-arena 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2417,18 +2417,18 @@ dependencies = [
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
] ]
[[package]] [[package]]
name = "wasmer-win-exception-handler" name = "wasmer-win-exception-handler"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"bindgen 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", "bindgen 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", "cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmer-runtime-core 0.3.0", "wasmer-runtime-core 0.4.0",
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]

View File

@ -130,11 +130,11 @@ wasmer_detect_profile() {
wasmer_link() { wasmer_link() {
printf "$cyan> Adding to bash profile...$reset\n" printf "$cyan> Adding to bash profile...$reset\n"
WASMER_PROFILE="$(wasmer_detect_profile)" WASMER_PROFILE="$(wasmer_detect_profile)"
LOAD_STR="\n# Wasmer\nexport WASMER_DIR=\"\$HOME/.wasmer\"\n[ -s \"\$WASMER_DIR/wasmer.sh\" ] && source \"\$WASMER_DIR/wasmer.sh\" # This loads wasmer\n" LOAD_STR="\n# Wasmer\nexport WASMER_DIR=\"$INSTALL_DIRECTORY\"\n[ -s \"\$WASMER_DIR/wasmer.sh\" ] && source \"\$WASMER_DIR/wasmer.sh\" # This loads wasmer\n"
SOURCE_STR="# Wasmer config\nexport WASMER_DIR=\"\$HOME/.wasmer\"\nexport WASMER_CACHE_DIR=\"\$WASMER_DIR/cache\"\nexport PATH=\"\$HOME/.wasmer/bin:\$HOME/.wasmer/globals/wapm_packages/.bin:\$PATH\"\n" SOURCE_STR="# Wasmer config\nexport WASMER_DIR=\"$INSTALL_DIRECTORY\"\nexport WASMER_CACHE_DIR=\"\$WASMER_DIR/cache\"\nexport PATH=\"\$WASMER_DIR/bin:\$WASMER_DIR/globals/wapm_packages/.bin:\$PATH\"\n"
# We create the wasmer.sh file # We create the wasmer.sh file
printf "$SOURCE_STR" > "$HOME/.wasmer/wasmer.sh" printf "$SOURCE_STR" > "$INSTALL_DIRECTORY/wasmer.sh"
if [ -z "${WASMER_PROFILE-}" ] ; then if [ -z "${WASMER_PROFILE-}" ] ; then
printf "${red}Profile not found. Tried:\n* ${WASMER_PROFILE} (as defined in \$PROFILE)\n* ~/.bashrc\n* ~/.bash_profile\n* ~/.zshrc\n* ~/.profile.\n" printf "${red}Profile not found. Tried:\n* ${WASMER_PROFILE} (as defined in \$PROFILE)\n* ~/.bashrc\n* ~/.bash_profile\n* ~/.zshrc\n* ~/.profile.\n"
@ -156,12 +156,12 @@ wasmer_link() {
echo "If this isn't the profile of your current shell then please add the following to your correct profile:" echo "If this isn't the profile of your current shell then please add the following to your correct profile:"
printf "$LOAD_STR$reset\n" printf "$LOAD_STR$reset\n"
version=`$HOME/.wasmer/bin/wasmer --version` || ( version=`$INSTALL_DIRECTORY/bin/wasmer --version` || (
printf "$red> wasmer was installed, but doesn't seem to be working :($reset\n" printf "$red> wasmer was installed, but doesn't seem to be working :($reset\n"
exit 1; exit 1;
) )
printf "$green> Successfully installed $version!\n\n${reset}If you want to have the command available now please execute:\nsource $HOME/.wasmer/wasmer.sh$reset\n" printf "$green> Successfully installed $version!\n\n${reset}If you want to have the command available now please execute:\nsource $INSTALL_DIRECTORY/wasmer.sh$reset\n"
printf "\nOtherwise, wasmer and wapm will be available the next time you open the terminal.\n" printf "\nOtherwise, wasmer and wapm will be available the next time you open the terminal.\n"
echo "Note: during the alpha release of wapm, telemetry is enabled by default; if you would like to opt out, run \`wapm config set telemetry.enabled false\`." echo "Note: during the alpha release of wapm, telemetry is enabled by default; if you would like to opt out, run \`wapm config set telemetry.enabled false\`."
echo "If you notice anything wrong or have any issues, please file a bug at https://github.com/wasmerio/wapm-cli :)" echo "If you notice anything wrong or have any issues, please file a bug at https://github.com/wasmerio/wapm-cli :)"
@ -257,7 +257,7 @@ wasmer_install() {
" "
fi fi
# if [ -d "$HOME/.wasmer" ]; then # if [ -d "$INSTALL_DIRECTORY" ]; then
# if which wasmer; then # if which wasmer; then
# local latest_url # local latest_url
# local specified_version # local specified_version
@ -286,11 +286,11 @@ wasmer_install() {
# exit 0 # exit 0
# else # else
# printf "$yellow> $wasmer_alt_version is already installed, Specified version: $specified_version.$reset\n" # printf "$yellow> $wasmer_alt_version is already installed, Specified version: $specified_version.$reset\n"
# rm -rf "$HOME/.wasmer" # rm -rf "$INSTALL_DIRECTORY"
# fi # fi
# else # else
# printf "$red> $HOME/.wasmer already exists, possibly from a past Wasmer install.$reset\n" # printf "$red> $INSTALL_DIRECTORY already exists, possibly from a past Wasmer install.$reset\n"
# printf "$red> Remove it (rm -rf $HOME/.wasmer) and run this script again.$reset\n" # printf "$red> Remove it (rm -rf $INSTALL_DIRECTORY) and run this script again.$reset\n"
# exit 0 # exit 0
# fi # fi
# fi # fi

View File

@ -18,6 +18,9 @@ DisableWelcomePage=no
Source: "..\..\target\release\wasmer.exe"; DestDir: "{app}\bin" Source: "..\..\target\release\wasmer.exe"; DestDir: "{app}\bin"
Source: "..\..\wapm-cli\target\release\wapm.exe"; DestDir: "{app}\bin" Source: "..\..\wapm-cli\target\release\wapm.exe"; DestDir: "{app}\bin"
[Dirs]
Name: "{%USERPROFILE}\.wasmer"
[Code] [Code]
const EnvironmentKey = 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment'; const EnvironmentKey = 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment';
@ -68,7 +71,7 @@ begin
if CurStep = ssPostInstall if CurStep = ssPostInstall
then begin then begin
EnvAddPath(ExpandConstant('{app}') +'\bin'); EnvAddPath(ExpandConstant('{app}') +'\bin');
EnvAddPath(ExpandConstant('{app}') +'\globals\wapm_packages\.bin'); EnvAddPath(ExpandConstant('{%USERPROFILE}') +'\globals\wapm_packages\.bin');
end end
end; end;
@ -77,6 +80,6 @@ begin
if CurUninstallStep = usPostUninstall if CurUninstallStep = usPostUninstall
then begin then begin
EnvRemovePath(ExpandConstant('{app}') +'\bin'); EnvRemovePath(ExpandConstant('{app}') +'\bin');
EnvAddPath(ExpandConstant('{app}') +'\globals\wapm_packages\.bin'); EnvAddPath(ExpandConstant('{%USERPROFILE}') +'\globals\wapm_packages\.bin');
end end
end; end;