Skip to content

Commit

Permalink
Fix no_std. (#248)
Browse files Browse the repository at this point in the history
Fixes various issues preventing building in a no-std environment.
  • Loading branch information
reitermarkus authored Dec 28, 2023
1 parent e96ce12 commit aad1956
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ name = "domain"
path = "src/lib.rs"

[dependencies]
octseq = "0.3"
time = "0.3.1"
octseq = { version = "0.3.2", default-features = false }
time = { version = "0.3.1", default-features = false }

rand = { version = "0.8", optional = true }
bytes = { version = "1.0", optional = true }
bytes = { version = "1.0", optional = true, default-features = false }
chrono = { version = "0.4.6", optional = true, default-features = false }
futures-util = { version = "0.3", optional = true }
heapless = { version = "0.7", optional = true }
Expand All @@ -46,7 +46,7 @@ resolv-sync = ["resolv", "tokio/rt"]
serde = ["dep:serde", "octseq/serde"]
sign = ["std"]
smallvec = ["dep:smallvec", "octseq/smallvec"]
std = []
std = ["bytes?/std", "octseq/std", "time/std"]
tsig = ["bytes", "ring", "smallvec"]
validate = ["std", "ring"]
zonefile = ["bytes", "std"]
Expand Down
3 changes: 3 additions & 0 deletions src/base/wire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ impl Composer for bytes::BytesMut {}
#[cfg(feature = "smallvec")]
impl<A: smallvec::Array<Item = u8>> Composer for smallvec::SmallVec<A> {}

#[cfg(feature = "heapless")]
impl<const N: usize> Composer for heapless::Vec<u8, N> {}

impl<T: Composer> Composer for &mut T {
fn append_compressed_dname<N: ToDname + ?Sized>(
&mut self,
Expand Down

0 comments on commit aad1956

Please sign in to comment.