Skip to content

Commit 73d8f68

Browse files
committed
feat: drop native impl
1 parent 51de20c commit 73d8f68

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+91
-1662
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/renovate.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"assignees": [
44
"HMBSbige"
55
],
6-
"commitMessagePrefix": "dep:",
76
"dependencyDashboard": false,
87
"extends": [
9-
"config:base",
8+
"config:recommended",
9+
":configMigration",
1010
":automergeBranch",
1111
":automergeDigest",
1212
":automergeMinor",

.github/workflows/CI.yml

Lines changed: 15 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,25 @@
11
name: CI
2-
on: [push, pull_request, workflow_dispatch]
2+
on:
3+
- push
4+
- pull_request
35
env:
46
ProjectName: ${{ github.event.repository.name }}
5-
RustProjectName: cryptobase
67

78
jobs:
89
check_format:
910
runs-on: ubuntu-latest
1011
steps:
11-
- name: Checkout code
12-
uses: actions/checkout@v4
13-
14-
- name: Setup .NET
15-
uses: actions/setup-dotnet@v4
12+
- uses: actions/checkout@v5
13+
- uses: actions/setup-dotnet@v5
1614
with:
17-
dotnet-version: 8.0.x
15+
dotnet-version: 10.0.x
1816

1917
- name: Check .NET format
2018
working-directory: src
2119
run: dotnet format -v diag --verify-no-changes
2220

23-
- uses: Swatinem/rust-cache@v2
24-
25-
- name: Install Rust
26-
run: |
27-
rustup set profile minimal
28-
rustup toolchain install stable --component clippy
29-
rustup default stable
30-
rustup override set stable
31-
32-
- name: Check Rust format
33-
working-directory: native/${{ env.RustProjectName }}
34-
run: cargo clippy --release --all-targets --all-features
35-
36-
build-native:
37-
strategy:
38-
matrix:
39-
include:
40-
- os: windows-latest
41-
target: x86_64-pc-windows-msvc
42-
- os: windows-latest
43-
target: i686-pc-windows-msvc
44-
- os: windows-latest
45-
target: aarch64-pc-windows-msvc
46-
- os: ubuntu-latest
47-
target: x86_64-unknown-linux-gnu
48-
- os: ubuntu-latest
49-
target: aarch64-unknown-linux-gnu
50-
- os: ubuntu-latest
51-
target: armv7-unknown-linux-gnueabihf
52-
- os: ubuntu-latest
53-
target: x86_64-unknown-linux-musl
54-
- os: ubuntu-latest
55-
target: aarch64-unknown-linux-musl
56-
- os: ubuntu-latest
57-
target: armv7-unknown-linux-musleabihf
58-
- os: macos-latest
59-
target: x86_64-apple-darwin
60-
- os: macos-latest
61-
target: aarch64-apple-darwin
62-
runs-on: ${{ matrix.os }}
63-
env:
64-
RUST_BACKTRACE: full
65-
steps:
66-
- name: Checkout code
67-
uses: actions/checkout@v4
68-
69-
- uses: Swatinem/rust-cache@v2
70-
71-
- name: Install Rust
72-
run: |
73-
rustup set profile minimal
74-
rustup toolchain install stable
75-
rustup default stable
76-
rustup override set stable
77-
rustup target add --toolchain stable ${{ matrix.target }}
78-
79-
- name: Install cross
80-
if: matrix.os == 'ubuntu-latest'
81-
run: cargo install cross
82-
83-
- name: Build ${{ matrix.target }}
84-
shell: pwsh
85-
run: .\build\build-native.ps1 ${{ matrix.target }}
86-
87-
- name: Upload ${{ matrix.target }}
88-
uses: actions/upload-artifact@v4
89-
with:
90-
name: runtimes
91-
path: src/${{ env.ProjectName }}/runtimes/
92-
9321
test:
94-
needs: [build-native]
9522
runs-on: ${{ matrix.os }}
96-
env:
97-
RUST_BACKTRACE: full
9823
strategy:
9924
matrix:
10025
os:
@@ -103,18 +28,10 @@ jobs:
10328
- macos-latest
10429

10530
steps:
106-
- name: Checkout code
107-
uses: actions/checkout@v4
108-
109-
- uses: actions/download-artifact@v4
31+
- uses: actions/checkout@v5
32+
- uses: actions/setup-dotnet@v5
11033
with:
111-
name: runtimes
112-
path: src/${{ env.ProjectName }}/runtimes/
113-
114-
- name: Setup .NET
115-
uses: actions/setup-dotnet@v4
116-
with:
117-
dotnet-version: 8.0.x
34+
dotnet-version: 10.0.x
11835

11936
- name: Run tests
12037
working-directory: src/${{ env.ProjectName }}.Tests
@@ -124,6 +41,8 @@ jobs:
12441
needs: [check_format, test]
12542
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
12643
runs-on: ubuntu-latest
44+
permissions:
45+
packages: write
12746
strategy:
12847
matrix:
12948
NugetProjectName:
@@ -132,17 +51,14 @@ jobs:
13251
- CryptoBase.BouncyCastle
13352

13453
steps:
135-
- name: Checkout code
136-
uses: actions/checkout@v4
137-
138-
- name: Setup .NET
139-
uses: actions/setup-dotnet@v4
54+
- uses: actions/checkout@v5
55+
- uses: actions/setup-dotnet@v5
14056
with:
141-
dotnet-version: 8.0.x
57+
dotnet-version: 10.0.x
14258

14359
- name: Build
14460
working-directory: src/${{ matrix.NugetProjectName }}
145-
run: dotnet build -c Release
61+
run: dotnet pack
14662

14763
- name: Push nuget packages
14864
working-directory: src/${{ matrix.NugetProjectName }}/bin/Release

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,5 +361,6 @@ MigrationBackup/
361361
# Fody - auto-generated XML schema
362362
FodyWeavers.xsd
363363

364-
# Native file
365-
**/runtimes/**/native/
364+
# JetBrains Rider
365+
.idea/
366+
*.sln.iml

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2022 HMBSbige
3+
Copyright (c) Bruce Wayne
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CRC-32 | ✅ |
2727
CRC-32C | ✅ |
2828
MD5 | ✅ |
2929
SHA1 | ✅ |
30-
SHA224 | |
30+
SHA224 | |
3131
SHA256 | ✅ |
3232
SHA384 | ✅ |
3333
SHA512 | ✅ |

build/BuildSpeedTest.ps1

Lines changed: 0 additions & 24 deletions
This file was deleted.

build/build-native.ps1

Lines changed: 0 additions & 58 deletions
This file was deleted.

native/cryptobase/.cargo/config.toml

Lines changed: 0 additions & 12 deletions
This file was deleted.

native/cryptobase/.gitignore

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)