Skip to content

Commit 10ae6ee

Browse files
committed
x509-tsp: make crate no_std
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
1 parent 8bd0903 commit 10ae6ee

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

.github/workflows/x509-tsp.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@ env:
2424
RUSTFLAGS: "-Dwarnings"
2525

2626
jobs:
27+
build:
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
rust:
32+
- 1.65.0 # MSRV
33+
- stable
34+
target:
35+
- thumbv7em-none-eabi
36+
- wasm32-unknown-unknown
37+
steps:
38+
- uses: actions/checkout@v3
39+
- uses: dtolnay/rust-toolchain@master
40+
with:
41+
toolchain: ${{ matrix.rust }}
42+
targets: ${{ matrix.target }}
43+
- uses: RustCrypto/actions/cargo-hack-install@master
44+
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --exclude-features arbitrary,builder,default,std
45+
2746
minimal-versions:
2847
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
2948
with:

x509-tsp/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Pure Rust implementation of the Timestamping Protocol as described in RFC 3161.
88
authors = ["RustCrypto Developers"]
99
license = "Apache-2.0 OR MIT"
1010
repository = "https://github.com/RustCrypto/formats/tree/master/x509-tsp"
11-
categories = ["cryptography", "encoding", "parser-implementations"]
11+
categories = ["cryptography", "encoding", "no-std", "parser-implementations"]
1212
keywords = ["crypto", "tsp", "timestamp"]
1313
readme = "README.md"
1414
rust-version = "1.65"
1515

1616
[dependencies]
1717
der = { version = "0.7.6", features = ["alloc", "derive", "oid", "pem"] }
18-
cms = { version = "0.2.1", features = ["alloc", "std"] }
19-
cmpv2 = { version = "0.2", features = ["alloc", "std"] }
18+
cms = { version = "0.2.1", features = ["alloc"] }
19+
cmpv2 = { version = "0.2", features = ["alloc"] }
2020
x509-cert = { version = "0.2.4", default-features = false }
2121

2222
[dev-dependencies]

x509-tsp/src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
#![no_std]
2+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
3+
#![doc = include_str!("../README.md")]
4+
#![doc(
5+
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
6+
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg"
7+
)]
8+
9+
extern crate alloc;
10+
111
use cmpv2::status::PkiStatusInfo;
212
use cms::content_info::ContentInfo;
313
use der::{
@@ -131,6 +141,7 @@ pub struct Accuracy {
131141
#[cfg(test)]
132142
mod tests {
133143
use super::*;
144+
use alloc::string::ToString;
134145
use cmpv2::status::*;
135146
use cms::signed_data::SignedData;
136147
use der::oid::db::rfc5912::ID_SHA_256;

0 commit comments

Comments
 (0)