This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Woosang Son
authored
Nov 23, 2021
1 parent
f360883
commit 84b6a7f
Showing
8 changed files
with
277 additions
and
599 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# make image | ||
# > docker build -t line/lfb-builder:static -f builders/Dockerfile.static . | ||
# | ||
# run build | ||
# > docker run -it --rm -v $(pwd):/code line/lfb-builder:static | ||
# | ||
# make image and run build | ||
# > docker run -it --rm -v $(pwd):/code -e LFB_BUILD_OPTIONS=rocksdb $(docker build -f builders/Dockerfile.static -q .) | ||
|
||
FROM rust:1.53 | ||
|
||
ENV LFB_BUILD_OPTIONS="goleveldb" | ||
|
||
# install tools | ||
RUN apt update && apt install -y cmake | ||
|
||
# install go | ||
WORKDIR /tmp | ||
ADD https://golang.org/dl/go1.15.15.linux-amd64.tar.gz . | ||
RUN tar -C /usr/local -xzf go1.15.15.linux-amd64.tar.gz | ||
ENV PATH=/usr/local/go/bin:$PATH | ||
|
||
WORKDIR /code | ||
|
||
# copy build script | ||
COPY builders/scripts/build-static.sh builders/scripts/build-static.sh | ||
|
||
# build lfb | ||
ENTRYPOINT builders/scripts/build-static.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env sh | ||
|
||
PROJECT_ROOT=$(realpath "$(dirname "$0")/../..") | ||
|
||
# install dependencies | ||
go mod download | ||
|
||
# build wasmvm static | ||
cd "$(go list -f "{{ .Dir }}" -m github.com/line/wasmvm)" || exit 1 | ||
RUSTFLAGS='-C target-feature=-crt-static' cargo build --release --example staticlib | ||
mv -f target/release/examples/libstaticlib.a /usr/lib/libwasmvm_static.a | ||
rm -rf target | ||
|
||
cd "${PROJECT_ROOT}" || exit 1 | ||
|
||
# build lfb | ||
BUILD_TAGS=static make build LFB_BUILD_OPTIONS="${LFB_BUILD_OPTIONS}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.