diff --git a/.gitignore b/.gitignore index d780043..cfc502b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ playwright/.cache/ wandb/ *.checkpoint +mkcert_development_CA_*.crt diff --git a/Cargo.toml b/Cargo.toml index 5c97999..91edf16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -133,9 +133,5 @@ lib-default-features = false # Optional. Defaults to "release". lib-profile-release = "wasm-release" -[[workspace.metadata.leptos]] -# project name -name = "chatclm" +# The binary target to use when multiple bin targets are defined bin-target = "chatclm" -#lib-package = "front" - diff --git a/Dockerfile b/Dockerfile index 853083b..815d99d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,14 +4,18 @@ FROM rustlang/rust:nightly-bookworm as builder # If you’re using stable, use this instead # FROM rust:1.74-bullseye as builder -# Install cargo-binstall, which makes it easier to install other -# cargo extensions like cargo-leptos -RUN wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz -RUN tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz -RUN cp cargo-binstall /usr/local/cargo/bin - -# Install cargo-leptos -RUN cargo binstall cargo-leptos@0.2.17 -y +# Install CA certificates for SSL verification and build dependencies including WASM support +RUN apt-get update && apt-get install -y ca-certificates build-essential clang wasi-libc && rm -rf /var/lib/apt/lists/* + +# Copy and trust the mkcert development CA for the proxy +COPY mkcert_development_CA_*.crt /usr/local/share/ca-certificates/ +RUN update-ca-certificates + +# Set environment variables for WASM compilation +ENV CFLAGS_wasm32_unknown_unknown="--sysroot=/usr/share/wasi-sysroot" + +# Install cargo-leptos using cargo install +RUN cargo install cargo-leptos@0.2.17 --locked # Add the WASM target RUN rustup target add wasm32-unknown-unknown