Skip to content

Commit e8d5f01

Browse files
authored
Merge branch 'master' into feature/remove-call-protected
2 parents 0d30c95 + 94fac3d commit e8d5f01

File tree

7 files changed

+37
-22
lines changed

7 files changed

+37
-22
lines changed

.circleci/config.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ jobs:
175175
# GIT_VERSION=$(git describe --exact-match --tags)
176176
echo "${VERSION}" >> artifacts/version
177177
echo "${CIRCLE_TAG}" >> artifacts/git_version
178-
cp ./target/release/wasmer ./artifacts/$(./binary-name.sh)
178+
make build-install
179+
cp ./wasmer.tar.gz ./artifacts/$(./binary-name.sh)
179180
- run:
180181
name: Debug flag checked
181182
command: |
@@ -217,11 +218,15 @@ jobs:
217218
- run:
218219
name: Install Rust
219220
command: |
220-
curl https://sh.rustup.rs -sSf | sh -s -- -y
221+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly-2019-04-11
221222
export PATH="$HOME/.cargo/bin:$PATH"
222223
cargo --version
223224
# Use rust nightly (for singlepass, for now)
224-
- run: rustup default nightly-2019-04-11
225+
# - run:
226+
# name: Install Rust nightly
227+
# command: |
228+
# export PATH="$HOME/.rustup/bin:$PATH"
229+
# rustup default nightly-2019-04-11
225230
- run:
226231
name: Tests
227232
command: |
@@ -251,9 +256,10 @@ jobs:
251256
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/"
252257
make production-release
253258
mkdir -p artifacts
259+
make build-install
260+
cp ./wasmer.tar.gz ./artifacts/$(./binary-name.sh)
254261
# VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
255262
# echo "${VERSION}" >> artifacts/version
256-
cp ./target/release/wasmer ./artifacts/$(./binary-name.sh)
257263
- persist_to_workspace:
258264
root: .
259265
paths:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
.DS_Store
55
.idea
66
**/.vscode
7+
install/

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wasmer"
3-
version = "0.2.1"
3+
version = "0.3.0"
44
authors = ["The Wasmer Engineering Team <[email protected]>"]
55
edition = "2018"
66
repository = "https://github.com/wasmerio/wasmer"

Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ lint:
3232

3333
precommit: lint test
3434

35+
build-install:
36+
mkdir -p ./install/bin
37+
cp ./target/release/wasmer ./install/bin/
38+
tar -C ./install -zcvf wasmer.tar.gz bin/wasmer
39+
40+
# For installing the contents locally
41+
do-install:
42+
tar -C ~/.wasmer -zxvf wasmer.tar.gz
43+
3544
test:
3645
# We use one thread so the emscripten stdouts doesn't collide
3746
cargo test --all --exclude wasmer-runtime-c-api --exclude wasmer-emscripten --exclude wasmer-spectests --exclude wasmer-singlepass-backend -- $(runargs)

binary-name.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ initOS() {
2323
darwin) OS='darwin';;
2424
linux) OS='linux';;
2525
freebsd) OS='freebsd';;
26-
mingw*) OS='windows';;
27-
msys*) OS='windows';;
26+
# mingw*) OS='windows';;
27+
# msys*) OS='windows';;
2828
*) echo "OS ${OS} is not supported by this installation script"; exit 1;;
2929
esac
3030
}
@@ -34,11 +34,11 @@ initArch
3434
initOS
3535

3636
# determine install directory if required
37-
BINARY="wasmer-${OS}-${ARCH}"
38-
37+
BINARY="wasmer-${OS}-${ARCH}.tar.gz"
38+
3939
# add .exe if on windows
40-
if [ "$OS" = "windows" ]; then
41-
BINARY="$BINARY.exe"
42-
fi
40+
# if [ "$OS" = "windows" ]; then
41+
# BINARY="$BINARY.exe"
42+
# fi
4343

4444
echo "${BINARY}"

install.sh

+8-9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ white="\033[37m"
3232
bold="\e[1m"
3333
dim="\e[2m"
3434

35+
# Warning: Remove this on the public repo
3536
RELEASES_URL="https://github.com/wasmerio/wasmer/releases"
3637

3738
wasmer_download_json() {
@@ -369,12 +370,12 @@ wasmer_download() {
369370
WASMER=INSTALL_DIRECTORY
370371

371372
# assemble expected release artifact name
372-
BINARY="wasmer-${OS}-${ARCH}"
373+
BINARY="wasmer-${OS}-${ARCH}.tar.gz"
373374

374375
# add .exe if on windows
375-
if [ "$OS" = "windows" ]; then
376-
BINARY="$BINARY.exe"
377-
fi
376+
# if [ "$OS" = "windows" ]; then
377+
# BINARY="$BINARY.exe"
378+
# fi
378379

379380
# if WASMER_RELEASE_TAG was not provided, assume latest
380381
if [ -z "$WASMER_RELEASE_TAG" ]; then
@@ -417,9 +418,6 @@ wasmer_download() {
417418
printf "\033[K\n\033[1A"
418419
# printf "\033[1A$cyan> Downloaded$reset\033[K\n"
419420
# echo "Setting executable permissions."
420-
chmod +x "$DOWNLOAD_FILE"
421-
422-
INSTALL_NAME="wasmer"
423421

424422
# windows not supported yet
425423
# if [ "$OS" = "windows" ]; then
@@ -428,8 +426,9 @@ wasmer_download() {
428426

429427
# echo "Moving executable to $INSTALL_DIRECTORY/$INSTALL_NAME"
430428

431-
mkdir -p $INSTALL_DIRECTORY/bin
432-
mv "$DOWNLOAD_FILE" "$INSTALL_DIRECTORY/bin/$INSTALL_NAME"
429+
mkdir -p $INSTALL_DIRECTORY
430+
# Untar the wasmer contents in the install directory
431+
tar -C $INSTALL_DIRECTORY -zxvf $DOWNLOAD_FILE
433432
}
434433

435434
wasmer_verify_or_quit() {

0 commit comments

Comments
 (0)