NLnetLabs / domain

A DNS library for Rust.

Home Page:https://nlnetlabs.nl/projects/domain/about/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature tsig without std fails to compile

Hawk777 opened this issue · comments

Add the following block to Cargo.toml:

[dependencies.domain]
default-features = false
features = ["tsig"]
version = "^0.7"

Compile. The result is an error:

error[E0433]: failed to resolve: use of undeclared crate or module `std`
  --> /home/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.7.0/src/tsig/mod.rs:71:5
   |
71 | use std::collections::HashMap;
   |     ^^^ use of undeclared crate or module `std`

error[E0432]: unresolved import `std`
  --> /home/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.7.0/src/tsig/mod.rs:72:5
   |
72 | use std::{cmp, error, fmt, hash, mem, str};
   |     ^^^ use of undeclared crate or module `std`

error[E0433]: failed to resolve: use of undeclared crate or module `std`
    --> /home/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/domain-0.7.0/src/tsig/mod.rs:1342:18
     |
1342 | impl<'a, Octets> std::ops::Deref for MessageTsig<'a, Octets>
     |                  ^^^ use of undeclared crate or module `std`

If tsig is intended to require std, it should probably declare such a dependency in domain’s Cargo.toml. If not, these errors should be fixed.

Thank you for the report! This should indeed work without std, even though we currently only have a key store using a hash map and thus requiring std.