Skip to content
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
20 changes: 4 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
matrix:
RUST:
# MSRV
- VERSION: "1.74.0"
- VERSION: "1.83.0"
FLAGS: ""

- VERSION: stable
Expand Down Expand Up @@ -84,13 +84,6 @@ jobs:
target/
key: ${{ runner.os }}-${{ matrix.RUST.VERSION }}-cargo-2-${{ hashFiles('**/Cargo.toml') }}

- run: |
cargo generate-lockfile
cargo update -p half --precise 2.4.1
cargo update -p rayon --precise 1.10.0
cargo update -p rayon-core --precise 1.12.1
if: matrix.RUST.VERSION == '1.74.0'

- run: cargo check --workspace --tests ${{ matrix.RUST.FLAGS }}
- run: cargo test --workspace ${{ matrix.RUST.FLAGS }}
if: "${{ !matrix.RUST.SKIP_TESTS }}"
Expand All @@ -104,7 +97,7 @@ jobs:

- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
toolchain: "1.74"
toolchain: "1.90"
components: llvm-tools-preview

- run: sudo apt update && sudo apt-get install -y lcov
Expand All @@ -115,12 +108,6 @@ jobs:
path: target/
key: ${{ runner.os }}-cargo-5-${{ hashFiles('**/Cargo.toml') }}

- run: |
cargo generate-lockfile
cargo update -p half --precise 2.4.1
cargo update -p rayon --precise 1.10.0
cargo update -p rayon-core --precise 1.12.1

- run: cargo test
env:
RUSTFLAGS: "-Cinstrument-coverage"
Expand All @@ -146,7 +133,8 @@ jobs:
-instr-profile=cargo-test-rust-cov.profdata \
--ignore-filename-regex='/.cargo/registry' \
--ignore-filename-regex='/rustc/' \
--ignore-filename-regex='/.rustup/toolchains/' --format=lcov > cargo-test.lcov
--ignore-filename-regex='/.rustup/toolchains/' \
--ignore-filename-regex='/tests/' --format=lcov > cargo-test.lcov

genhtml cargo-test.lcov -o coverage-html | tee output.log

Expand Down
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories = ["parser-implementations", "encoding", "no-std"]

edition = "2021"
# This specifies the MSRV
rust-version = "1.74.0"
rust-version = "1.83.0"

[features]
default = ["std"]
Expand All @@ -22,8 +22,7 @@ itoa = "1.0.11"

[dev-dependencies]
libc = "0.2.11"
# TODO: upgrade to 0.6 when we raise MSRV
criterion = "0.5"
criterion = "0.7"

[workspace]
members = ["asn1_derive", "asn1parse"]
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Add `asn1` to your `Cargo.toml`:
$ cargo add asn1
```

Builds on Rust 1.74.0 and newer.
Builds on Rust 1.83.0 and newer.

`rust-asn1` is compatible with `#![no_std]` environments:

Expand All @@ -31,6 +31,10 @@ $ cargo add asn1 --no-default-features
methods that allow encoding EXPLICIT/IMPLICIT elements when the tag number
is not known at compile time.

#### Changes

- Updated MSRV to 1.83.0.

### [0.22.0]

#### Added
Expand Down
8 changes: 4 additions & 4 deletions asn1_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ license = "BSD-3-Clause"
description = "#[derive] support for asn1"
edition = "2021"
# This specifies the MSRV
rust-version = "1.74.0"
rust-version = "1.83.0"

[lib]
proc-macro = true

[dependencies]
proc-macro2 = "1.0.60"
quote = "1.0.25"
syn = "2.0.8"
proc-macro2 = "1.0.69"
quote = "1.0.28"
syn = "2.0.21"
4 changes: 2 additions & 2 deletions asn1parse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ version = "0.1.0"
edition = "2021"
publish = false
# This specifies the MSRV
rust-version = "1.74.0"
rust-version = "1.83.0"

[dependencies]
asn1 = { version = "0.22", path = ".." }
clap = { version = "4.3", features = ["derive"] }
clap = { version = "4.5", features = ["derive"] }
hex = "0.4.3"
pem = { version = "3.0.4", default-features = false, features = ["std"] }
6 changes: 3 additions & 3 deletions examples/no_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ fn main() {
// Using libc::printf because println! isn't no_std!
match result {
Ok((r, s)) => unsafe {
libc::printf(b"r=%ld, s=%ld\n\x00".as_ptr() as *const libc::c_char, r, s)
libc::printf(c"r=%ld, s=%ld\n".as_ptr() as *const libc::c_char, r, s)
},
Err(_) => unsafe { libc::printf("Error\n\x00".as_ptr() as *const libc::c_char) },
Err(_) => unsafe { libc::printf(c"Error\n".as_ptr() as *const libc::c_char) },
};

let computed = asn1::write(|w| {
Expand All @@ -26,7 +26,7 @@ fn main() {
.unwrap();
unsafe {
libc::printf(
"Original length: %ld\nComputed length: %ld\n\x00".as_ptr() as *const libc::c_char,
c"Original length: %ld\nComputed length: %ld\n".as_ptr() as *const libc::c_char,
data.len() as i64,
computed.len() as i64,
);
Expand Down