Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on windows #60

Closed
rubenh2905 opened this issue Apr 20, 2023 · 1 comment
Closed

Build error on windows #60

rubenh2905 opened this issue Apr 20, 2023 · 1 comment

Comments

@rubenh2905
Copy link

i'm on windows 10 and i'm using following toolchain

> rustup show
Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\ASUS\.rustup

installed toolchains
--------------------

stable-x86_64-pc-windows-gnu
stable-x86_64-pc-windows-msvc (default)

installed targets for active toolchain
--------------------------------------

x86_64-pc-windows-msvc
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.69.0 (84c898d65 2023-04-16)

the error is

> cargo check
    Checking tun v0.5.5
error[E0433]: failed to resolve: could not find `unix` in `os`
  --> C:\Users\ASUS\.cargo\registry\src\github.com-1ecc6299db9ec823\tun-0.5.5\src\configuration.rs:16:14
   |
16 | use std::os::unix::io::RawFd;
   |              ^^^^ could not find `unix` in `os`

error[E0432]: unresolved import `crate::platform::create`
  --> C:\Users\ASUS\.cargo\registry\src\github.com-1ecc6299db9ec823\tun-0.5.5\src\lib.rs:28:9
   |
28 | pub use crate::platform::create;
   |         ^^^^^^^^^^^^^^^^^^^^^^^ no `create` in `platform`

error[E0412]: cannot find type `Configuration` in module `platform`
  --> C:\Users\ASUS\.cargo\registry\src\github.com-1ecc6299db9ec823\tun-0.5.5\src\configuration.rs:38:36
   |
38 |     pub(crate) platform: platform::Configuration,
   |                                    ^^^^^^^^^^^^^ not found in `platform`
   |
help: consider importing this struct
   |
15 | use crate::Configuration;
   |
help: if you import `Configuration`, refer to it directly
   |
38 -     pub(crate) platform: platform::Configuration,
38 +     pub(crate) platform: Configuration,
   |

error[E0412]: cannot find type `Configuration` in module `platform`
  --> C:\Users\ASUS\.cargo\registry\src\github.com-1ecc6299db9ec823\tun-0.5.5\src\configuration.rs:55:34
   |
55 |         F: FnOnce(&mut platform::Configuration),
   |                                  ^^^^^^^^^^^^^ not found in `platform`
   |
help: consider importing this struct
   |
15 | use crate::Configuration;
   |
help: if you import `Configuration`, refer to it directly
   |
55 -         F: FnOnce(&mut platform::Configuration),
55 +         F: FnOnce(&mut Configuration),
   |

error[E0618]: expected function, found `F`
  --> C:\Users\ASUS\.cargo\registry\src\github.com-1ecc6299db9ec823\tun-0.5.5\src\configuration.rs:57:9
   |
53 |     pub fn platform<F>(&mut self, f: F) -> &mut Self
   |                                   - `f` has type `F`
...
57 |         f(&mut self.platform);
   |         ^--------------------
   |         |
   |         call expression requires function

Some errors have detailed explanations: E0412, E0432, E0433, E0618.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `tun` due to 5 previous errors

and the Cargo.toml file

[package]
name = "rust-test-3"
version = "0.1.0"
edition = "2021"

[dependencies]
tun = "0.5.5"
@M0dEx
Copy link

M0dEx commented Apr 24, 2023

That's because Windows is not supported by this library at the moment.

See #27 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants