Skip to content

Commit

Permalink
Initial swift creation 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 50d68ee commit 8ba33e8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
11 changes: 10 additions & 1 deletion quickbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,13 @@ cp target/x86_64-unknown-linux-musl/release/rust ../wrongsecrets-rust-linux-mus
echo "compiling for musl linux (ARM)"
rustup target add aarch64-unknown-linux-musl
cargo build --target aarch64-unknown-linux-musl --release
cp target/aarch64-unknown-linux-musl/release/rust ../wrongsecrets-rust-linux-musl-arm
cp target/aarch64-unknown-linux-musl/release/rust ../wrongsecrets-rust-linux-musl-arm
cd ..


echo "compiling Swfit, requires macos"
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
14 changes: 14 additions & 0 deletions swift/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "wrongsecrets-swift",
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.executableTarget(
name: "wrongsecrets-swift"),
]
)
4 changes: 4 additions & 0 deletions swift/Sources/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// The Swift Programming Language
// https://docs.swift.org/swift-book

print("Hello, world!")

0 comments on commit 8ba33e8

Please sign in to comment.