Skip to content

Commit

Permalink
feat: add std feautre flag for channels-serdes
Browse files Browse the repository at this point in the history
  • Loading branch information
threadexio committed Mar 21, 2024
1 parent e137ead commit 37b2757
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 30 deletions.
20 changes: 9 additions & 11 deletions channels-serdes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,29 @@ keywords = ["serde", "serializer", "deserializer"]
readme = "README.md"

[features]
std = []
bincode = ["dep:serde", "dep:bincode"]
cbor = ["dep:serde", "dep:ciborium"]
cbor = ["dep:serde", "dep:ciborium", "std"]
json = ["dep:serde", "dep:serde_json"]
borsh = ["dep:borsh"]

[dependencies]
bincode = { version = "1.3", optional = true }
ciborium = { version = "0.2", optional = true }
borsh = { version = "1.3", optional = true }

channels-io = { version = "0.1.0", features = [
"alloc",
], path = "../channels-io" }

[dependencies.serde]
version = "1.0"
default-features = false
optional = true
ciborium = { version = "0.2", optional = true }
serde = { version = "1.0", default_features = false, optional = true }

[dependencies.serde_json]
version = "1.0"
default-features = false
features = ["alloc"]
optional = true

[dependencies.channels-io]
version = "0.1.0"
features = ["alloc"]
path = "../channels-io"

[lints]
workspace = true

Expand Down
18 changes: 0 additions & 18 deletions channels-serdes/build.rs

This file was deleted.

2 changes: 1 addition & 1 deletion channels-serdes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
//! assert_eq!(deserialized, Ok(42));
//! ```
#![cfg_attr(channels_nightly, feature(doc_auto_cfg))]
#![cfg_attr(not(needs_std), no_std)]
#![cfg_attr(not(feature = "std"), no_std)]

use channels_io::{Contiguous, Walkable};

Expand Down

0 comments on commit 37b2757

Please sign in to comment.