Skip to content

Commit 7f820d3

Browse files
committed
Update dependencies and refine tooling
- Pin cargo-deny/nextest/llvm-cov/audit versions - Enable license checks in CI - Clarify implied-vol MIT license with hash verification - Update workspace license from deprecated LGPL-3.0 to LGPL-3.0-or-later
1 parent 3ba219d commit 7f820d3

File tree

11 files changed

+108
-102
lines changed

11 files changed

+108
-102
lines changed

.github/workflows/build-v2.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,11 @@ jobs:
5757
persist-credentials: false
5858

5959
# https://github.com/EmbarkStudios/cargo-deny-action
60-
# NOTE: License checking is disabled due to implied-vol crate not declaring
61-
# its license in Cargo.toml (has MIT LICENSE file but shows as "unlicensed").
62-
# License compliance is verified manually until this is resolved upstream.
63-
# See deny.toml for documented exception and tracking.
64-
- name: Run cargo-deny (advisories, sources, bans)
60+
- name: Run cargo-deny (advisories, licenses, sources, bans)
6561
uses: EmbarkStudios/cargo-deny-action@f9cc7aa250dec5698b425dc01fbf0d745fcd1b78 # v2.0.13
6662
with:
63+
command: check advisories licenses sources bans
6764
arguments: --all-features
68-
command: check advisories sources bans
6965

7066
build:
7167
needs:

.github/workflows/build.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,11 @@ jobs:
5252
persist-credentials: false
5353

5454
# https://github.com/EmbarkStudios/cargo-deny-action
55-
# NOTE: License checking is disabled due to implied-vol crate not declaring
56-
# its license in Cargo.toml (has MIT LICENSE file but shows as "unlicensed").
57-
# License compliance is verified manually until this is resolved upstream.
58-
# See deny.toml for documented exception and tracking.
59-
- name: Run cargo-deny (advisories, sources, bans)
55+
- name: Run cargo-deny (advisories, licenses, sources, bans)
6056
uses: EmbarkStudios/cargo-deny-action@f9cc7aa250dec5698b425dc01fbf0d745fcd1b78 # v2.0.13
6157
with:
58+
command: check advisories licenses sources bans
6259
arguments: --all-features
63-
command: check advisories sources bans
6460

6561
build-linux-x86:
6662
strategy:

.pre-commit-config.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,14 @@ repos:
137137
##############################################################################
138138
# Rust formatting and linting
139139
##############################################################################
140-
- repo: local
140+
- repo: https://github.com/EmbarkStudios/cargo-deny
141+
rev: 0.18.5
141142
hooks:
142143
- id: cargo-deny
143-
name: cargo deny
144-
description: Run cargo-deny security checks (advisories, sources, bans)
145-
entry: .pre-commit-hooks/cargo_deny.sh
146-
language: script
147-
files: '(Cargo\.(toml|lock)|deny\.toml)$'
148-
pass_filenames: false
144+
args: ["--all-features", "check"]
149145

146+
- repo: local
147+
hooks:
150148
- id: check-anyhow-usage
151149
name: check anyhow usage
152150
description:

.pre-commit-hooks/cargo_deny.sh

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

Cargo.lock

Lines changed: 40 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ version = "0.52.0"
3838
edition = "2024"
3939
rust-version = "1.90.0"
4040
authors = ["Nautech Systems <[email protected]>"]
41-
license = "LGPL-3.0"
41+
license = "LGPL-3.0-or-later"
4242
readme = "README.md"
4343
description = "A high-performance algorithmic trading platform and event-driven backtester"
4444
categories = ["finance", "simulation", "asynchronous"]
@@ -331,6 +331,15 @@ turmoil = "0.6.6"
331331
# -----------------------------------------------------------------------------
332332
cbindgen = "0.29.2"
333333

334+
# -----------------------------------------------------------------------------
335+
# Tools (for cargo install, used by Makefile and CI)
336+
# -----------------------------------------------------------------------------
337+
[workspace.metadata.tools]
338+
cargo-audit = "0.21.2"
339+
cargo-deny = "0.18.5"
340+
cargo-llvm-cov = "0.6.21"
341+
cargo-nextest = "0.9.108"
342+
334343
# -----------------------------------------------------------------------------
335344
# Profiles
336345
# -----------------------------------------------------------------------------

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ IMAGE?=$(REGISTRY)$(PROJECT)
66
GIT_TAG:=$(shell git rev-parse --abbrev-ref HEAD)
77
IMAGE_FULL?=$(IMAGE):$(GIT_TAG)
88

9+
# Tool versions from Cargo.toml [workspace.metadata.tools]
10+
CARGO_AUDIT_VERSION := $(shell grep '^cargo-audit *= *"' Cargo.toml | awk -F\" '{print $$2}')
11+
CARGO_DENY_VERSION := $(shell grep '^cargo-deny *= *"' Cargo.toml | awk -F\" '{print $$2}')
12+
CARGO_LLVM_COV_VERSION := $(shell grep '^cargo-llvm-cov *= *"' Cargo.toml | awk -F\" '{print $$2}')
13+
CARGO_NEXTEST_VERSION := $(shell grep '^cargo-nextest *= *"' Cargo.toml | awk -F\" '{print $$2}')
14+
915
V = 0 # 0 / 1 - verbose mode
1016
Q = $(if $(filter 1,$V),,@) # Quiet mode, suppress command output
1117
M = $(shell printf "\033[0;34m>\033[0m") # Message prefix for commands
@@ -242,10 +248,12 @@ cargo-build: #-- Build Rust crates in release mode
242248
cargo build --release --all-features
243249

244250
.PHONY: cargo-update
245-
cargo-update: #-- Update Rust dependencies and install test tools
251+
cargo-update: #-- Update Rust dependencies and install required tools (versions from Cargo.toml)
246252
cargo update \
247-
&& cargo install cargo-nextest \
248-
&& cargo install cargo-llvm-cov
253+
&& cargo install cargo-deny --version $(CARGO_DENY_VERSION) --locked \
254+
&& cargo install cargo-nextest --version $(CARGO_NEXTEST_VERSION) --locked \
255+
&& cargo install cargo-llvm-cov --version $(CARGO_LLVM_COV_VERSION) --locked \
256+
&& cargo install cargo-audit --version $(CARGO_AUDIT_VERSION) --locked
249257

250258
.PHONY: cargo-check
251259
cargo-check: #-- Check Rust code without building

RELEASES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,20 @@ Released on TBD (UTC).
1212
- Dropped support for Python 3.11
1313

1414
### Security
15+
TBD
1516

1617
### Fixes
18+
None
1719

1820
### Internal Improvements
21+
- Refactored reading of feather files in catalog (#3114), thanks @faysou
22+
- Upgraded implied-vol crate (#3115), thanks @faysou
1923

2024
### Documentation Updates
25+
None
2126

2227
### Deprecations
28+
None
2329

2430
---
2531

deny.toml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,32 @@ allow = [
3838
"Apache-2.0",
3939
"Apache-2.0 WITH LLVM-exception",
4040
"BSD-2-Clause",
41+
"BSD-2-Clause-Patent",
4142
"BSD-3-Clause",
43+
"BSL-1.0",
4244
"ISC",
4345
"MPL-2.0",
4446
"CC0-1.0",
47+
"CDLA-Permissive-2.0",
4548
"Zlib",
4649
"Unicode-DFS-2016",
4750
"Unicode-3.0",
4851
"0BSD",
4952
"LGPL-3.0",
53+
"LGPL-3.0-only",
54+
"LGPL-3.0-or-later",
5055
"OpenSSL",
56+
"Unlicense",
5157
]
5258

5359
confidence-threshold = 0.8
5460

55-
# Per-crate license exceptions
56-
exceptions = [
57-
# implied-vol v1.3.0 contains an MIT LICENSE file but doesn't specify
58-
# `license = "MIT"` in its Cargo.toml manifest, causing cargo-deny to
59-
# fail license detection. Verified MIT licensed at:
60-
# https://crates.io/crates/implied-vol/1.3.0
61-
{ allow = ["MIT"], crate = "implied-vol" },
62-
]
61+
# Clarify licenses for crates with missing/incorrect license metadata
62+
[[licenses.clarify]]
63+
name = "implied-vol"
64+
version = "*"
65+
expression = "MIT"
66+
license-files = [{ path = "LICENSE", hash = 0xb0803f0e }]
6367

6468
[licenses.private]
6569
# Ignore workspace crates that aren't published

0 commit comments

Comments
 (0)