Skip to content

Commit

Permalink
Document no_std usage
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos committed Jul 23, 2024
1 parent 2c50b5a commit 7235931
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,18 @@ If this overhead is problematic, you can disable it by instead specifying the fo

```toml
[dependencies]
blurhash = { version = "0.2.3", default-features = false }
blurhash = { version = "0.2.3", default-features = false, features = ["std"] }
```

Blurhash can also run in `no_std` environments by disabling the default features:

```toml
[dependencies]
blurhash = { version = "0.2.3", default-features = false, features = ["fast-linear-to-srgb"] }
```

Blurhash requires Rust 1.82 or later when using `no_std`.

### Encoding
```rust
use blurhash::encode;
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(not(any(test, feature = "std")), feature(error_in_core))]

//! A pure Rust implementation of [woltapp/blurhash][1].
//!
Expand Down

0 comments on commit 7235931

Please sign in to comment.