endpoint-libs 1.3.5

Common dependencies to be used with Pathscale projects, projects that use [endpoint-gen](https://github.com/pathscale/endpoint-gen), and projects that use honey_id-types.
Documentation
FROM rust:1.85 AS builder
WORKDIR /app

# Cache dependency compilation with stub sources
COPY Cargo.toml Cargo.lock ./
COPY src ./src
COPY examples/ws-echo/Cargo.toml examples/ws-echo/Cargo.toml
RUN mkdir -p examples/ws-echo/src && \
    echo 'fn main() {}' > examples/ws-echo/src/main.rs && \
    cargo build --release --manifest-path examples/ws-echo/Cargo.toml --target-dir /app/target

# Build the real binary
COPY examples/ws-echo/src ./examples/ws-echo/src
RUN touch examples/ws-echo/src/main.rs && \
    cargo build --release --manifest-path examples/ws-echo/Cargo.toml --target-dir /app/target

FROM debian:bookworm-slim
COPY --from=builder /app/target/release/ws-echo /app/ws-echo
EXPOSE 8080
CMD ["/app/ws-echo"]