From 939201fedbfcc1fbcc000e1d03fa8cfce983f44c Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Thu, 9 Mar 2023 08:50:55 +0100 Subject: [PATCH] compile static musl for cdylib support --- Cargo.lock | 2 +- Dockerfile | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 93086bf..e065794 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1537,7 +1537,7 @@ checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "woweb" -version = "0.1.0" +version = "0.2.0" dependencies = [ "axum", "axum-extra", diff --git a/Dockerfile b/Dockerfile index af8536c..9d5f316 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,12 @@ FROM docker.io/rust:1.67-alpine3.17 AS builder +ENV RUSTFLAGS="-C target-feature=-crt-static" + RUN apk add --no-cache \ - musl-dev + musl-dev \ + wasm-pack + +RUN rustup target add wasm32-unknown-unknown ADD . /src WORKDIR /src