From 805f6c24d6c19f9a85cfe1540ba5a5090562bfc1 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 22 Aug 2023 14:55:10 -0700 Subject: contrib: added wasmtime. --- pkg/contrib/src/wasmtime/Makefile | 30 ++++++++++++++++++++++++++++++ pkg/contrib/src/wasmtime/SHA512SUMS | 1 + pkg/contrib/src/wasmtime/version | 1 + 3 files changed, 32 insertions(+) create mode 100644 pkg/contrib/src/wasmtime/Makefile create mode 100644 pkg/contrib/src/wasmtime/SHA512SUMS create mode 100644 pkg/contrib/src/wasmtime/version diff --git a/pkg/contrib/src/wasmtime/Makefile b/pkg/contrib/src/wasmtime/Makefile new file mode 100644 index 00000000..11797fee --- /dev/null +++ b/pkg/contrib/src/wasmtime/Makefile @@ -0,0 +1,30 @@ +# wasmtime + +include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/version +WASMTIME_URL := https://github.com/bytecodealliance/wasmtime/releases/download/v$(WASMTIME_VERSION)/wasmtime-v$(WASMTIME_VERSION)-src.tar.gz + +PKGS += wasmtime + +ifeq ($(shell which cargo >/dev/null 2>&1 || echo FAIL),) +CARGO = cargo +else +CARGO = $(error Cargo (Rust package manager) not found) +endif + +ifeq ($(shell uname -s),Linux) +WASMTIME_ARGS=-Clink-arg=-Wl,-soname,libwasmtime.so +endif + +$(TARBALLS)/wasmtime-v$(WASMTIME_VERSION)-src.tar.gz: + $(call download_pkg,$(WASMTIME_URL),wasmtime) + +.sum-wasmtime: wasmtime-v$(WASMTIME_VERSION)-src.tar.gz + +wasmtime: wasmtime-v$(WASMTIME_VERSION)-src.tar.gz .sum-wasmtime + $(UNPACK) + $(MOVE) + +.wasmtime: wasmtime + cd $< && $(CARGO) rustc --release -p wasmtime-c-api -- $(WASMTIME_ARGS) + cp $