Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vyloy committed Feb 3, 2024
1 parent 04bf863 commit 4b6339f
Show file tree
Hide file tree
Showing 24 changed files with 691 additions and 78 deletions.
11 changes: 11 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[target.x86_64-unknown-linux-gnu]
linker = "x86_64-linux-gnu-gcc"
rustflags = ["-C", "target-feature=+crt-static"]

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
rustflags = ["-C", "target-feature=+crt-static"]

[target.riscv64gc-unknown-linux-gnu]
linker = "riscv64-linux-gnu-gcc"
rustflags = ["-C", "target-feature=+crt-static"]
3 changes: 2 additions & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ jobs:
mkdir -p release
cp target/x86_64-unknown-linux-gnu/release/gt release/linux-x86_64-gt
cp target/aarch64-unknown-linux-gnu/release/gt release/linux-aarch64-gt
cp target/riscv64gc-unknown-linux-gnu/release/gt release/linux-riscv64-gt
upx release/*
# linux/riscv64 is not supported yet: https://github.com/upx/upx/issues/649
cp target/riscv64gc-unknown-linux-gnu/release/gt release/linux-riscv64-gt

- name: Archive GT artifacts
uses: actions/upload-artifact@v3
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

/cs/build
/cs/release
/cs/dep/_msquic/out
/cs/dep/_google-webrtc/src/out
/libcs/build
/libcs/release
/libcs/dep/_msquic/out
/libcs/dep/_google-webrtc/src/out
/target/
.dockerignore
.DS_Store
Expand Down
100 changes: 54 additions & 46 deletions bin/Cargo.lock → Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[workspace]
members = ["bin"]
resolver = "2"

[workspace.package]
authors = ["Zhiyi Weng"]
version = "2.1.6"
edition = "2021"
description = "Fast WebSocket(s)/HTTP(s)/TCP relay proxy with WebRTC P2P supports."

[patch.crates-io]
webrtc = { git = "https://github.com/vyloy/webrtc.git", branch = "master" }
rcgen = { git = "https://github.com/vyloy/rcgen.git", branch = "main" }
x509-parser = { git = "https://github.com/vyloy/x509-parser.git", branch = "master" }
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
linux:
cd ./cs && TARGET=aarch64-linux-gnu GOOS=linux GOARCH=arm64 make release_lib
cd ./libcs && TARGET=aarch64-linux-gnu GOOS=linux GOARCH=arm64 make release_lib
cargo build --target aarch64-unknown-linux-gnu -r
cd ./cs && TARGET=x86_64-linux-gnu GOOS=linux GOARCH=amd64 make release_lib
cd ./libcs && TARGET=x86_64-linux-gnu GOOS=linux GOARCH=amd64 make release_lib
cargo build --target x86_64-unknown-linux-gnu -r
cd ./cs && TARGET=riscv64-linux-gnu GOOS=linux GOARCH=riscv64 make release_lib
cd ./libcs && TARGET=riscv64-linux-gnu GOOS=linux GOARCH=riscv64 make release_lib
cargo build --target riscv64gc-unknown-linux-gnu -r

mac:
cd ./cs && TARGET=aarch64-apple-darwin GOOS=darwin GOARCH=arm64 arch -arch arm64 make release_lib
cd ./libcs && TARGET=aarch64-apple-darwin GOOS=darwin GOARCH=arm64 arch -arch arm64 make release_lib
cargo build --target aarch64-apple-darwin -r
cd ./cs && TARGET=x86_64-apple-darwin GOOS=darwin GOARCH=amd64 arch -arch x86_64 make release_lib
cd ./libcs && TARGET=x86_64-apple-darwin GOOS=darwin GOARCH=amd64 arch -arch x86_64 make release_lib
cargo build --target x86_64-apple-darwin -r
Loading

0 comments on commit 4b6339f

Please sign in to comment.