Factor out the "raw_socket" and "tap_interface" features #15
+32
−18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem: I'm investigating the possibility of using smoltcp in Redox (yeah, I know, I'm not the first one). The unusual thing about Redox is that while it has a version of Rust's
libstd
, it doesn't have libc and thelibc
crate doesn't support it, so while it's possible to usestd::Box
andstd::Vect
, raw sockets are unavailable. As a result, it's impossible to build smoltcp for Redox with thestd
feature on, which leaves many features disabled for no reason.Solution: The PR factors out the
raw_socket
andtap_interfaces
features, making thestd
feature not dependent on thelibc
crate.raw_socket
andtap_interfaces
are still default features. With this PR it's possible to build smoltcp for Redox with--no-default-features --features="collections alloc std"
.Other: I was going to create a long-term fork, but turns out the required changes are minimal, so if it's ok with you, it would be great to depend directly on the original.