Skip to content

Commit b4da176

Browse files
committed
Write Documentation and add CI for no_std
1 parent 3e0fe90 commit b4da176

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.travis.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,23 @@ matrix:
1919
- cargo tarpaulin --version || RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install --force cargo-tarpaulin
2020
- cargo fuzz --version || cargo install --force cargo-fuzz
2121

22+
# no_std
23+
- rust: stable
24+
env: TARGET="--target thumbv6m-none-eabi" FEATURES="--no-default-features --features alloc"
25+
install:
26+
- rustup target add thumbv6m-none-eabi
27+
2228
cache: cargo
2329

2430
env:
2531
# prevent cargo fuzz list from printing with color
2632
- TERM=dumb
2733

2834
script:
29-
- cargo build --verbose
30-
- cargo test --verbose
31-
- cargo doc --verbose
35+
- cargo build --verbose $TARGET --no-default-features
36+
- cargo build --verbose $TARGET $FEATURES
37+
- 'if [[ -z "$TARGET" ]]; then cargo test --verbose; fi'
38+
- 'if [[ -z "$TARGET" ]]; then cargo doc --verbose; fi'
3239
- 'if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo bench --no-run; fi'
3340
# run for just a second to confirm that it can build and run ok
3441
- 'if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo fuzz list | xargs -L 1 -I FUZZER cargo fuzz run FUZZER -- -max_total_time=1; fi'

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ Decoding is aided by some pre-calculated tables, which are generated by:
5050
cargo run --example make_tables > src/tables.rs.tmp && mv src/tables.rs.tmp src/tables.rs
5151
```
5252

53+
no_std
54+
---
55+
56+
This crate supports no_std. By default the crate targets std via the `std` feature. You can deactivate the `default-features` to target core instead. In that case you lose out on all the functionality revolving around `std::io`, `std::error::Error` and heap allocations. There is an additional `alloc` feature that you can activate to bring back the support for heap allocations.
57+
5358
Profiling
5459
---
5560

0 commit comments

Comments
 (0)