Skip to content

Commit

Permalink
early crosscompiling for OWASP/wrongsecrets#615
Browse files Browse the repository at this point in the history
  • Loading branch information
commjoen committed Feb 23, 2024
1 parent 8ba33e8 commit 1467d3d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ target/

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

swift/.build
18 changes: 13 additions & 5 deletions quickbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,17 @@ cp target/aarch64-unknown-linux-musl/release/rust ../wrongsecrets-rust-linux-mu
cd ..


echo "compiling Swfit, requires macos"
echo "compiling Swfit, requires macos on x86" #https://www.swift.org/documentation/server/guides/building.html
cd swift
swift build --product wrongsecrets-swift --show-bin-path -c release
cp .build/x86_64-apple-macosx/debug ../wrongsecrets-swift-macos # dockerize this one as well ;-)
docker run -v "$PWD:/code" -w /code swift:latest swift build --product wrongsecrets-swift --show-bin-path -c release
cp .build/x86_64-unknown-linux-gnu/debug ../wrongsecrets-swift-linux
swift run wrongsecrets-swift
swift run wrongsecrets-swift -c release
cp .build/x86_64-apple-macosx/release/wrongsecrets-swift ../wrongsecrets-swift-macos # dockerize this one as well ;-)
docker run -v "$PWD:/sources" -w /sources swift:latest swift run -c release
cp .build/aarch64-unknown-linux-gnu/release ../wrongsecrets-swift-linux-arm
docker run -v "$PWD:/sources" -w /sources --platform linux/amd64 swift:latest swift run -c release
cp .build/x86_64-unknown-linux-gnu/release ../wrongsecrets-swift-linux
## TODO:
## - ADD MACOS fully containerized for arm and x86
## - ADD WINDOWS,
## - ADD LINUX MUSL
## - ADD LINUX MUSL ARM

0 comments on commit 1467d3d

Please sign in to comment.