Use ring as default crypto backend

This commit is contained in:
eric
2024-05-06 19:42:07 +08:00
parent 7a31f50c56
commit 42c9d74676
6 changed files with 33 additions and 24 deletions

View File

@@ -25,7 +25,7 @@ jobs:
- name: test leaf
run: cargo test -p leaf
build-bin-cross:
build-cli-cross:
runs-on: ubuntu-latest
strategy:
fail-fast: false
@@ -86,14 +86,14 @@ jobs:
name: leaf-${{ matrix.target }}
path: leaf-${{ matrix.target }}
build-bin-local:
build-cli-macos:
runs-on: [macos-latest]
strategy:
fail-fast: false
matrix:
os: [macos-latest]
include:
- os: macos-latest
target: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
target:
- aarch64-apple-darwin
- x86_64-apple-darwin
steps:
- name: checkout
uses: actions/checkout@v2
@@ -114,6 +114,10 @@ jobs:
run: |
brew install llvm protobuf
- name: install target
run: |
rustup target add ${{ matrix.target }}
- name: build
run: |
export CFG_COMMIT_HASH=`git log --pretty=format:'%h' -n 1`
@@ -130,7 +134,7 @@ jobs:
name: leaf-${{ matrix.target }}
path: leaf-${{ matrix.target }}
build-apple:
build-lib-apple:
runs-on: macos-latest
steps:
- name: checkout
@@ -163,7 +167,7 @@ jobs:
name: leaf.xcframework.zip
path: leaf.xcframework.zip
build-android:
build-lib-android:
runs-on: ubuntu-latest
steps:
- name: checkout

View File

@@ -6,7 +6,7 @@ on:
- v*
jobs:
build-bin-cross:
build-cli-cross:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -63,14 +63,14 @@ jobs:
name: leaf-${{ matrix.target }}
path: leaf-${{ matrix.target }}
build-bin-local:
build-cli-macos:
runs-on: [macos-latest]
strategy:
fail-fast: false
matrix:
os: [macos-latest]
include:
- os: macos-latest
target: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
target:
- aarch64-apple-darwin
- x86_64-apple-darwin
steps:
- name: checkout
uses: actions/checkout@v2
@@ -87,6 +87,10 @@ jobs:
run: |
brew install llvm protobuf
- name: install target
run: |
rustup target add ${{ matrix.target }}
- name: build
run: |
export CFG_COMMIT_HASH=`git log --pretty=format:'%h' -n 1`
@@ -103,7 +107,7 @@ jobs:
name: leaf-${{ matrix.target }}
path: leaf-${{ matrix.target }}
build-apple:
build-lib-apple:
runs-on: macos-latest
steps:
- name: checkout
@@ -136,7 +140,7 @@ jobs:
name: leaf.xcframework.zip
path: leaf.xcframework.zip
build-android:
build-lib-android:
runs-on: ubuntu-latest
steps:
- name: checkout
@@ -182,7 +186,7 @@ jobs:
path: leaf-android-libs.zip
create-release:
needs: [build-bin-cross, build-bin-local, build-apple, build-android]
needs: [build-cli-cross, build-cli-macos, build-lib-apple, build-lib-android]
runs-on: macos-latest
steps:
- name: checkout
@@ -211,13 +215,14 @@ jobs:
name: upload_url.txt
path: ./upload_url.txt
release-bin:
release-cli:
needs: [create-release]
runs-on: macos-latest
strategy:
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
- x86_64-pc-windows-gnu

View File

@@ -83,7 +83,7 @@ Clone & Build:
```sh
git clone --recursive https://github.com/eycorsican/leaf.git
cd leaf
cargo build -p leaf-bin
cargo build -p leaf-cli
```
Run:

View File

@@ -10,7 +10,7 @@ path = "src/main.rs"
[features]
default = [
"leaf/default-aws-lc",
"leaf/default-ring",
"leaf/outbound-quic",
"leaf/outbound-quic",
"leaf/ctrlc",

View File

@@ -11,7 +11,7 @@ crate-type = ["staticlib", "dylib"]
[features]
default = [
"default-aws-lc",
"default-ring",
]
default-aws-lc= [

View File

@@ -11,7 +11,7 @@ path = "src/lib.rs"
[features]
default = [
"default-aws-lc"
"default-ring"
]
default-ring = [