Skip to content

Commit

Permalink
Write Documentation and add CI for no_std
Browse files Browse the repository at this point in the history
  • Loading branch information
CryZe committed Sep 3, 2019
1 parent 3e0fe90 commit b4da176
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .travis.yml
Expand Up @@ -19,16 +19,23 @@ matrix:
- cargo tarpaulin --version || RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install --force cargo-tarpaulin
- cargo fuzz --version || cargo install --force cargo-fuzz

# no_std
- rust: stable
env: TARGET="--target thumbv6m-none-eabi" FEATURES="--no-default-features --features alloc"
install:
- rustup target add thumbv6m-none-eabi

cache: cargo

env:
# prevent cargo fuzz list from printing with color
- TERM=dumb

script:
- cargo build --verbose
- cargo test --verbose
- cargo doc --verbose
- cargo build --verbose $TARGET --no-default-features
- cargo build --verbose $TARGET $FEATURES
- 'if [[ -z "$TARGET" ]]; then cargo test --verbose; fi'
- 'if [[ -z "$TARGET" ]]; then cargo doc --verbose; fi'
- 'if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo bench --no-run; fi'
# run for just a second to confirm that it can build and run ok
- 'if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo fuzz list | xargs -L 1 -I FUZZER cargo fuzz run FUZZER -- -max_total_time=1; fi'
Expand Down
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -50,6 +50,11 @@ Decoding is aided by some pre-calculated tables, which are generated by:
cargo run --example make_tables > src/tables.rs.tmp && mv src/tables.rs.tmp src/tables.rs
```

no_std
---

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.

Profiling
---

Expand Down

0 comments on commit b4da176

Please sign in to comment.