From 19da4235252b96f562ec4bb1c06aec06db15d6b5 Mon Sep 17 00:00:00 2001 From: 223880 Date: Fri, 19 Jul 2024 07:31:38 -0300 Subject: [PATCH] Add cross-platform (Windows, Linux and Mac) --- Dockerfile | 24 ++++++++++++++++++------ README.md | 1 + 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index d0559306..7c39ab79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,21 @@ FROM rust:1.79.0 as builder + WORKDIR /app -RUN apt-get update && apt-get install -y \ git \ -RUN git clone https://github.com/Bitswap-BiFi-Bitswap-demo.git /path/to/clone + +RUN apt-get update && apt-get install -y git mingw-w64 + +RUN rustup target add x86_64-pc-windows-gnu + +RUN git clone https://github.com/Bitswap-BiFi-Bitswap-demo.git /app/Bitswap-BiFi-Bitswap-demo + WORKDIR /app/Bitswap-BiFi-Bitswap-demo -RUN cd Bitswap-BiFi-Bitswap-demo && cargo build -RUN --releasCOPY --from=builder /Bitswap-BiFi-Bitswap-demo/target/release/main. -RUN --releaseCMD ["./main"] -CMD ["main.rs", "command.rs"] + +RUN cargo build --release --target x86_64-pc-windows-gnu + +FROM debian:buster-slim + +WORKDIR /app + +COPY --from=builder /app/Bitswap-BiFi-Bitswap-demo/target/x86_64-pc-windows-gnu/release/main.exe . + +CMD ["./main.exe", "main.rs", "command.rs"] diff --git a/README.md b/README.md index 8201e655..224067e4 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ Check [here](https://github.com/BitSwap-BiFi/Bitswap-FAQ/) - [ ] Release crates - [ ] Full CLI +- [x] Cross-platform - [x] Full GUI by rust - [ ] Liquid support to CLI - [x] Testnet4