Skip to content

Request: Windows support #4

@usagi

Description

@usagi

This project is really excellent✨ But, in now, it would not work in Windows environment. I'm looking forward to support Windows.

For now, I got these errors using nj-cli build in Windows:

PS C:\Users\usagi\tmp\node-bindgen\examples\function> nj-cli build
   Compiling flv-future-aio v1.0.0
error[E0433]: failed to resolve: could not find `unix` in `os`
 --> C:\Users\usagi\.cargo\registry\src\github.com-1ecc6299db9ec823\flv-future-aio-1.0.0\src\fs\file_slice.rs:3:14
  |
3 | use std::os::unix::io::RawFd;
  |              ^^^^ could not find `unix` in `os`

error[E0433]: failed to resolve: could not find `sys` in `nix`
 --> C:\Users\usagi\.cargo\registry\src\github.com-1ecc6299db9ec823\flv-future-aio-1.0.0\src\zero_copy.rs:7:10
  |
7 | use nix::sys::sendfile::sendfile;
  |          ^^^ could not find `sys` in `nix`

error[E0432]: unresolved import `nix::Error`
 --> C:\Users\usagi\.cargo\registry\src\github.com-1ecc6299db9ec823\flv-future-aio-1.0.0\src\zero_copy.rs:8:5
  |
8 | use nix::Error as NixError;
  |     ^^^^^^^^^^^^^^^^^^^^^^ no `Error` in the root

error[E0412]: cannot find type `RawFd` in this scope
  --> C:\Users\usagi\.cargo\registry\src\github.com-1ecc6299db9ec823\flv-future-aio-1.0.0\src\fs\file_slice.rs:11:9
   |
11 |     fd: RawFd,
   |         ^^^^^ not found in this scope

error[E0412]: cannot find type `RawFd` in this scope
  --> C:\Users\usagi\.cargo\registry\src\github.com-1ecc6299db9ec823\flv-future-aio-1.0.0\src\fs\file_slice.rs:18:20
   |
18 |     pub fn new(fd: RawFd,position: u64,len: u64) -> Self {
   |                    ^^^^^ not found in this scope

error[E0412]: cannot find type `RawFd` in this scope
  --> C:\Users\usagi\.cargo\registry\src\github.com-1ecc6299db9ec823\flv-future-aio-1.0.0\src\fs\file_slice.rs:34:25
   |
34 |     pub fn fd(&self) -> RawFd {
   |                         ^^^^^ not found in this scope

error[E0405]: cannot find trait `AsRawFd` in this scope
  --> C:\Users\usagi\.cargo\registry\src\github.com-1ecc6299db9ec823\flv-future-aio-1.0.0\src\fs\file_slice.rs:42:6
   |
42 | impl AsRawFd for AsyncFileSlice {
   |      ^^^^^^^ not found in this scope

error[E0412]: cannot find type `RawFd` in this scope
  --> C:\Users\usagi\.cargo\registry\src\github.com-1ecc6299db9ec823\flv-future-aio-1.0.0\src\fs\file_slice.rs:44:28
   |
44 |     fn as_raw_fd(&self) -> RawFd {
   |                            ^^^^^ not found in this scope

error[E0405]: cannot find trait `AsRawFd` in this scope
  --> C:\Users\usagi\.cargo\registry\src\github.com-1ecc6299db9ec823\flv-future-aio-1.0.0\src\zero_copy.rs:46:26
   |
46 | pub trait ZeroCopyWrite: AsRawFd {
   |                          ^^^^^^^ not found in this scope

error[E0425]: cannot find value `ft` in this scope
  --> C:\Users\usagi\.cargo\registry\src\github.com-1ecc6299db9ec823\flv-future-aio-1.0.0\src\zero_copy.rs:93:9
   |
93 |         ft.await
   |         ^^ not found in this scope

error: aborting due to 10 previous errors

Some errors have detailed explanations: E0405, E0412, E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0405`.
error: could not compile `flv-future-aio`.

To learn more, run the command again with --verbose.
thread 'main' panicked at 'copy failed: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', C:\Users\usagi\.cargo\registry\src\github.com-1ecc6299db9ec823\nj-cli-0.1.2\src\main.rs:69:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Please let me know if you know a workaround. I'm not hurry but I really expecting to success of the project. 👍

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions