Skip to content

Commit

Permalink
put basic github actions in place
Browse files Browse the repository at this point in the history
  • Loading branch information
jcreekmore committed Feb 1, 2023
1 parent 5e55bf6 commit b19353d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: ci
on:
pull_request:
push:
branches:
- master
jobs:
msrv:
name: msrv
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.67.0
components: clippy, rustfmt
- run: cargo fmt --all
- run: cargo clippy --all-features -- --deny warnings
- run: cargo test --all-features
- run: cargo bench --all-features
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ readme = "README.md"
repository = "https://github.com/jcreekmore/pem-rs.git"
version = "1.1.2-alpha.0"
categories = [ "cryptography" ]
edition = "2018"
rust-version = "1.34.2"
edition = "2021"
rust-version = "1.67.0"

This comment has been minimized.

Copy link
@clux

clux Apr 3, 2023

Hey there. There is probably a good reason for this version bump, but in case it was fairly arbitrary for you, I just wanted to note that this close-to-latest-stable MSRV does make including the new pem version harder for libraries that have stricter MSRVs. E.g. kube MSRV lags 3 versions behind by user requests, so we have to wait for a month or two to bump this.

This comment has been minimized.

Copy link
@jcreekmore

jcreekmore Apr 3, 2023

Author Owner

It was fairly arbitrary, but I hadn't touched the MSRV in quite some time (1.34.2 came out in May 2019) and, given that I was planning on updating everything to a 2.0 API with a breaking change, I figured I would break it severely and give myself a bit of breathing room on MSRV (I was doing development for other projects on 1.67 by that point). The latest actual bugfix was done still on 1.x and still has the previous MSRV associated with it, so there is no reason to move forward to 2.x if you don't need the added features of being able to see and manipulate the PEM headers that are (very rarely) present (adding that in caused the API breakage... but I also boosted to a later base64 in a later commit due to the newer MSRV).

This comment has been minimized.

Copy link
@clux

clux Apr 3, 2023

Hehe ok, that is perfectly reasonable. Appreciate the summary.
The pem 2.0 release upgrades pretty cleanly, and it's pretty easy to handle the changes thanks to the changelog that gets inlined in dependabot prs, so thanks for doing all of that!
Funnily enough breaking changes are less of a problem than a strict msrv :-)


[dependencies]
base64 = "0.13.0"
Expand Down
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ pem

A Rust library for parsing and encoding PEM-encoded data.

[![Build Status](https://travis-ci.org/jcreekmore/pem-rs.svg?branch=master)](https://travis-ci.org/jcreekmore/pem-rs)
![Build Status](https://github.com/github/docs/actions/workflows/ci.yml/badge.svg)


### Documentation
[Module documentation with examples](https://docs.rs/pem/)
Expand All @@ -14,20 +15,12 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
pem = "1.0"
```

and this to your crate root:

```rust
extern crate pem;
pem = "2.0"
```

Here is a simple example that parse PEM-encoded data and prints the tag:

```rust
extern crate pem;

use pem::parse;

const SAMPLE: &'static str = "-----BEGIN RSA PRIVATE KEY-----
Expand Down

0 comments on commit b19353d

Please sign in to comment.