Skip to content

Commit 08f1424

Browse files
soulbirdsoulbird
and
soulbird
authored
feat: support compiling under arm64 architecture (#102)
Co-authored-by: soulbird <[email protected]>
1 parent d5291f2 commit 08f1424

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

install-wasmtime.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
# limitations under the License.
1515
#
1616
set -euo pipefail -x
17+
arch=$(uname -m | tr '[:upper:]' '[:lower:]')
1718

19+
ARCH=$arch
1820
VER=v0.35.1
19-
wget https://github.com/bytecodealliance/wasmtime/releases/download/${VER}/wasmtime-${VER}-x86_64-linux-c-api.tar.xz
20-
tar -xvf ./wasmtime-${VER}-x86_64-linux-c-api.tar.xz > /dev/null
21+
wget https://github.com/bytecodealliance/wasmtime/releases/download/${VER}/wasmtime-${VER}-${ARCH}-linux-c-api.tar.xz
22+
tar -xvf ./wasmtime-${VER}-${ARCH}-linux-c-api.tar.xz > /dev/null
2123
if [ -d wasmtime-c-api ]; then
2224
rm -rf wasmtime-c-api
2325
fi
24-
mv wasmtime-${VER}-x86_64-linux-c-api wasmtime-c-api
26+
mv wasmtime-${VER}-${ARCH}-linux-c-api wasmtime-c-api
2527
if echo "int main(void) {}" | gcc -o /dev/null -v -x c - &> /dev/stdout| grep collect | tr -s " " "\012" | grep musl; then
2628
# build from source code if the libc is musl
2729
git clone https://github.com/bytecodealliance/wasmtime -b ${VER} --depth 1 \

0 commit comments

Comments
 (0)