Skip to content

Commit

Permalink
build: remove references to unused c bindings of wasmtime
Browse files Browse the repository at this point in the history
Before the changes intorducing the new wasmtime bindings we relied
on an downloaded static library libwasmtime.a. Now that the bindings
are introduced, we do not rely on it anymore, so all references to
it can be removed.
  • Loading branch information
wmitros committed Jan 5, 2023
1 parent 9cd5dae commit 01934a9
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 97 deletions.
6 changes: 1 addition & 5 deletions configure.py
Expand Up @@ -44,16 +44,12 @@
distro_extra_ldflags = ''
distro_extra_cmake_args = []
employ_ld_trickery = True
has_wasmtime = False
use_wasmtime_as_library = False

# distro-specific setup
def distro_setup_nix():
global os_ids, employ_ld_trickery, has_wasmtime, use_wasmtime_as_library
global os_ids, employ_ld_trickery
os_ids = ['linux']
employ_ld_trickery = False
has_wasmtime = True
use_wasmtime_as_library = True

if os.environ.get('NIX_CC'):
distro_setup_nix()
Expand Down
1 change: 0 additions & 1 deletion default.nix
Expand Up @@ -152,7 +152,6 @@ in derive ({
systemd
thrift
valgrind
wasmtime
xorg.libpciaccess
xxHash
zlib
Expand Down
4 changes: 0 additions & 4 deletions dist/nix/overlay.nix
Expand Up @@ -18,9 +18,5 @@ in {
doCheck = false;
};

# use the ancient version 0.29 of wasmtime because Scylla does not
# build with newer ones
wasmtime = final.callPackage ./pkg/upstreamable/wasmtime { };

scylla-driver = final.callPackage ./pkg/upstreamable/python-driver { };
}
47 changes: 0 additions & 47 deletions dist/nix/pkg/upstreamable/wasmtime/default.nix

This file was deleted.

40 changes: 0 additions & 40 deletions install-dependencies.sh
Expand Up @@ -203,29 +203,6 @@ node_exporter_url() {
echo "https://github.com/prometheus/node_exporter/releases/download/v$NODE_EXPORTER_VERSION/$(node_exporter_filename)"
}

WASMTIME_VERSION=0.29.0
WASMTIME_DIR=/opt/scylladb/dependencies
declare -A WASMTIME_CHECKSUM=(
["x86_64"]=e94a9a768270e86e7f7eac1a68575bb1f287702822e83b14c3b04bf7e865a84c
["aarch64"]=36a257aef36f5a0cabc8ce414e31ccede9c16ca996d6b07cb440a32aaa263164
)

wasmtime_filename() {
echo "wasmtime-v$WASMTIME_VERSION-$(arch)-linux-c-api.tar.xz"
}

wasmtime_fullpath() {
echo "$WASMTIME_DIR/$(wasmtime_filename)"
}

wasmtime_checksum() {
sha256sum "$(wasmtime_fullpath)" | while read -r sum _; do [[ "$sum" == "${WASMTIME_CHECKSUM["$(arch)"]}" ]]; done
}

wasmtime_url() {
echo "https://github.com/bytecodealliance/wasmtime/releases/download/v$WASMTIME_VERSION/$(wasmtime_filename)"
}

print_usage() {
echo "Usage: install-dependencies.sh [OPTION]..."
echo ""
Expand Down Expand Up @@ -329,23 +306,6 @@ elif [ "$ID" = "fedora" ]; then
exit 1
fi
fi
if [ -f "$(wasmtime_fullpath)" ] && wasmtime_checksum; then
echo "$(wasmtime_filename) already exists, skipping download"
else
mkdir -p "$WASMTIME_DIR"
if curl --retry 5 -fSL -o "$(wasmtime_fullpath)" "$(wasmtime_url)"; then
if ! wasmtime_checksum; then
echo "$(wasmtime_filename) download failed, skipping"
else
( cd $WASMTIME_DIR; tar xvf $(wasmtime_filename) )
wasmtime_unpacked=$(basename $(wasmtime_filename) .tar.xz)
cp $WASMTIME_DIR/$wasmtime_unpacked/lib/libwasmtime.a /usr/lib64/
cp -r $WASMTIME_DIR/$wasmtime_unpacked/include/was{m.h,i.h,mtime,mtime.h} /usr/local/include/
fi
else
echo "$(wasmtime_url) is unreachable, skipping"
fi
fi
elif [ "$ID" = "centos" ]; then
dnf install -y "${centos_packages[@]}"
echo -e "Configure example:\n\tpython3.4 ./configure.py --enable-dpdk --mode=release --static-boost --compiler=/opt/scylladb/bin/g++-7.3 --python python3.4 --ldflag=-Wl,-rpath=/opt/scylladb/lib64 --cflags=-I/opt/scylladb/include --with-antlr3=/opt/scylladb/bin/antlr3"
Expand Down

0 comments on commit 01934a9

Please sign in to comment.