From 9073658e12329a9bc41bde52c1d7ccb200de118e Mon Sep 17 00:00:00 2001 From: bel Date: Sat, 25 Mar 2023 19:21:46 -0600 Subject: [PATCH] update readme with linux build windows --- host.d/README.md | 9 ++++++++- host.d/config.d/rusty-pipe.d/rusty-pipe.exe | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) create mode 120000 host.d/config.d/rusty-pipe.d/rusty-pipe.exe diff --git a/host.d/README.md b/host.d/README.md index 154f95f..1d662ed 100644 --- a/host.d/README.md +++ b/host.d/README.md @@ -11,9 +11,16 @@ ## Distribute `rusty-pipe` ```bash +# https://www.reddit.com/r/rust/comments/5k8uab/crosscompiling_from_ubuntu_to_windows_with_rustup/ +( + echo '[target.x86_64-pc-windows-gnu]' + echo 'linker = "x86_64-w64-mingw32-gcc"' + echo 'ar = "x86_64-w64-mingw32-gcc-ar"' +) >> $HOME/.cargo/config +sudo apt install mingw-w64 rustup target add x86_64-pc-windows-gnu echo windows -cargo build --target x86_64-pc-windows-gnu && ls target/x86_64-pc-windows-gnu/release/rusty-pipe.exe +cargo build --release --target x86_64-pc-windows-gnu && ls target/x86_64-pc-windows-gnu/release/rusty-pipe.exe echo local cargo install --path ./ ``` diff --git a/host.d/config.d/rusty-pipe.d/rusty-pipe.exe b/host.d/config.d/rusty-pipe.d/rusty-pipe.exe new file mode 120000 index 0000000..eafe89e --- /dev/null +++ b/host.d/config.d/rusty-pipe.d/rusty-pipe.exe @@ -0,0 +1 @@ +../../../../rusty-pipe.d/target/x86_64-pc-windows-gnu/release/rusty-pipe.exe \ No newline at end of file