I try to build `mget` on rust v1.60 on mac and the build fails because of: ``` ➜ ch8-mget git:(1st-edition) ✗ cargo build Compiling mget v0.1.0 (/Users/adria/Programming/rust-in-action/ch8/ch8-mget) error[E0432]: unresolved import `smoltcp::phy::TapInterface` --> src/main.rs:2:5 | 2 | use smoltcp::phy::TapInterface; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `TapInterface` in `phy` error[E0432]: unresolved import `smoltcp::phy::TapInterface` --> src/http.rs:7:38 | 7 | use smoltcp::phy::{wait as phy_wait, TapInterface}; | ^^^^^^^^^^^^ no `TapInterface` in `phy` ``` I also had to modify `Cargo.toml` because curly bracket content cannot be separated over several lines. In my IDE, I can however see that `TapInterface` exists. Any idea?
Activity
fix TOML in Cargo.toml
dmitris commentedon Nov 11, 2022
@elchead you probably are trying to build on a Mac - you need a Linux OS to build this, the
smaltcppackage exports the symbol conditionally on the target_os value beinglinux:https://github.com/smoltcp-rs/smoltcp/blob/bcc7e58caea01685dabc2333eab88022846271aa/src/phy/mod.rs#L115-L116
elchead commentedon Nov 23, 2022
Thanks, good to know!