diff --git a/configure.py b/configure.py index eb3b420821c2..c3b465ec1c33 100755 --- a/configure.py +++ b/configure.py @@ -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() diff --git a/default.nix b/default.nix index 6459210703e4..5fe18e356f85 100644 --- a/default.nix +++ b/default.nix @@ -152,7 +152,6 @@ in derive ({ systemd thrift valgrind - wasmtime xorg.libpciaccess xxHash zlib diff --git a/dist/nix/overlay.nix b/dist/nix/overlay.nix index 850e833e4856..210a06a4c1b5 100644 --- a/dist/nix/overlay.nix +++ b/dist/nix/overlay.nix @@ -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 { }; } diff --git a/dist/nix/pkg/upstreamable/wasmtime/default.nix b/dist/nix/pkg/upstreamable/wasmtime/default.nix deleted file mode 100644 index 74a6b5487d8f..000000000000 --- a/dist/nix/pkg/upstreamable/wasmtime/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ pkgs -}: - -let - inherit (pkgs) - cmake - fetchFromGitHub - python3 - rustPlatform - ; - - llvm = pkgs.llvmPackages_latest; - clang = llvm.clang; - - pname = "wasmtime"; - version = "0.29.0"; - -in rustPlatform.buildRustPackage { - inherit pname version; - src = fetchFromGitHub { - owner = "bytecodealliance"; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-qmME9zI2vSFQlJWhve7dqAPh8O/6WclWTwO9Pcdvoj8="; - fetchSubmodules = true; - }; - - cargoSha256 = "sha256-xtx1iCtZ9rRJec6Q7ywBM3ov9z0YJMcxz7K59Ox6DKk="; - - nativeBuildInputs = [ python3 cmake clang ]; - buildInputs = [ llvm.libclang ]; - LIBCLANG_PATH = "${llvm.libclang.lib}/lib"; - - cargoBuildFlags = [ "--package wasmtime-c-api" ]; - - # cargo does not install the C(++) headers - postInstall = '' - install -d -m744 $out/include/wasmtime - install -m644 $src/crates/c-api/include/*.h $out/include - install -m644 $src/crates/c-api/include/wasmtime/*.h $out/include/wasmtime - install -m644 $src/crates/c-api/wasm-c-api/include/* $out/include - ''; - - # Scylla has to use this version (later ones change APIs), and it - # happens not to pass its own tests, so: - doCheck = false; -} diff --git a/install-dependencies.sh b/install-dependencies.sh index f39555f4977d..b06e8ab00ad9 100755 --- a/install-dependencies.sh +++ b/install-dependencies.sh @@ -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 "" @@ -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"