Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite in Rust #2

Merged
merged 18 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Install Dependencies
run: |
pip3 install mypy -U
pip3 install -U mypy

- name: mypy
run: mypy --show-column-numbers --hide-error-context .
42 changes: 42 additions & 0 deletions .github/workflows/publish_crate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and upload Rust crate

# Build on every branch push, tag push, and pull request change:
on: [push, pull_request]

jobs:
build_rust:
name: Build Rust stuff and run Rust tests
runs-on: ubuntu-latest

steps:
- name: Checkout reposistory
uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Check format
run: cargo fmt --check

- name: Setup clippy
run: rustup component add clippy

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build Rust package
run: cargo build --release --workspace

- name: Build Rust tests
run: cargo test --workspace

- name: Publish dry run
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
run: cargo publish --dry-run

- name: Upload crate
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Dependencies
run: |
pip3 install -U maturin

- name: Install local ipl3checksum
run: pip install .

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/tests_other_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Test other repo
on: [push, pull_request]

jobs:
build_repo:
name: Test other repo
test_other_repo_py:
name: Test other repo (Python)
runs-on: ubuntu-latest

strategy:
Expand All @@ -15,6 +15,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Dependencies
run: |
python3 -m pip install -U maturin

- name: Install local ipl3checksum
run: python3 -m pip install .

Expand Down
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"rust-analyzer.cargo.features": [
"c_bindings",
"python_bindings"
]
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add Rust support
- New static method `CICKind.fromHashMd5`.
- Returns a CIC kind based on the passed md5 hash.

### Changed

- Library was reimplemented in Rust, allowing faster runtime calculation.
- The Python API is still the same

### Fixed

- Fix links in `CHANGELOG.md`

## [1.0.1] - 2023-09-21
Expand Down
Loading
Loading