From 4da5823c24f6582f72666338496f8f1fa168a26e Mon Sep 17 00:00:00 2001 From: Alex Snaps Date: Tue, 2 May 2023 12:14:46 -0400 Subject: [PATCH] Fixing builds --- Dockerfile | 2 +- limitador/Cargo.toml | 1 + limitador/src/storage/disk/mod.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3d0e4f2c..dbf9928c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true ARG RUSTC_VERSION=1.67.1 RUN apk update \ && apk upgrade \ - && apk add build-base binutils-gold openssl3-dev protoc protobuf-dev curl git \ + && apk add build-base binutils-gold openssl3-dev protoc protobuf-dev curl git linux-headers clang \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --profile minimal --default-toolchain ${RUSTC_VERSION} -c rustfmt -y WORKDIR /usr/src/limitador diff --git a/limitador/Cargo.toml b/limitador/Cargo.toml index bac9ed03..089fc7d8 100644 --- a/limitador/Cargo.toml +++ b/limitador/Cargo.toml @@ -31,6 +31,7 @@ async-trait = "0.1" cfg-if = "1" prometheus = "0.13" lazy_static = "1" +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] rocksdb = { version = "0.20.1", features = ["multi-threaded-cf"] } # Optional dependencies diff --git a/limitador/src/storage/disk/mod.rs b/limitador/src/storage/disk/mod.rs index f3cd5c6e..2f05b9a9 100644 --- a/limitador/src/storage/disk/mod.rs +++ b/limitador/src/storage/disk/mod.rs @@ -7,6 +7,7 @@ mod rocksdb_storage; #[cfg(not(target_arch = "wasm32"))] pub use rocksdb_storage::RocksDbStorage as DiskStorage; +#[cfg(not(target_arch = "wasm32"))] impl From for StorageErr { fn from(error: rocksdb::Error) -> Self { Self {