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

Support Windows #5

Open
LeSplooch opened this issue Jan 24, 2020 · 4 comments
Open

Support Windows #5

LeSplooch opened this issue Jan 24, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@LeSplooch
Copy link

LeSplooch commented Jan 24, 2020

Hello ! I've added wavy through cargo add wavy and effectively got wavy = "0.1.2" in my Cargo.toml, but I can't use it without getting a can't find crate rustc(E0463) error. Have I missed a step that would be specific to your crate ?

EDIT : I'm using rustc 1.40.0

@AldaronLau
Copy link
Member

I can't reproduce the error. Here's what I did:

cargo new wavy-add
cd wavy-add/
cargo add wavy
# add `use wavy` at the top of src/main.rs
cargo build
# failed because cargo add messed up the toml file, so I deleted and remade
cargo add wavy
cargo build
# it builds fine

I also noticed that my version of cargo-add (which I just installed, because I did not have before), used "*" as the version instead of "0.1.2". I'm guessing it's either a cargo add bad old version, or a Cargo.lock problem.

Try,

cargo update

and see if that works, otherwise try,

cargo install cargo-add --force

to update cargo add, and re-create your TOML file.

Can you please tell me if either works, and if not post Cargo.toml, Cargo.lock and main.rs files?

@AldaronLau AldaronLau added the invalid This doesn't seem right label Jan 25, 2020
@LeSplooch
Copy link
Author

LeSplooch commented Jan 28, 2020

First, here are the files you requested as a ZIP file because Github doesn't allow their formats to be published seperately.

wavy_test.zip

I just tried again with a new project. Here are my steps :
cargo update
cargo install cargo-add --force
cargo new wavy_test
cargo add wavy

Then I added the use wavy::* part to main.rs

cargo build

And here is the output :

PS F:\Rust Test\wavy_test> cargo build
   Compiling libc v0.2.66
   Compiling wavy v0.1.2
  --> C:\Users\LeSplooch\.cargo\registry\src\github.com-1ecc6299db9ec823\wavy-0.1.2\src\system.rs:71:14
   |
71 |         self.0.play(&mut || {
   |              ^ unknown field

error[E0609]: no field `0` on type `&mut system::MicrophoneSystem`
  --> C:\Users\LeSplooch\.cargo\registry\src\github.com-1ecc6299db9ec823\wavy-0.1.2\src\system.rs:96:14
   |
96 |         self.0.record(generator);
   |              ^ unknown field

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0609`.
error: could not compile `wavy`.

To learn more, run the command again with --verbose.
PS F:\Rust Test\wavy_test>

@AldaronLau
Copy link
Member

This is a different error than "can't find rust crate". This is due to wavy not supporting Windows yet (it only works on Linux at the moment). Sorry about that, hopefully wavy will support Windows soon.

@AldaronLau AldaronLau added enhancement New feature or request and removed invalid This doesn't seem right labels Jan 28, 2020
@AldaronLau AldaronLau changed the title "Can't find crate" error Support Windows Jan 28, 2020
@LeSplooch
Copy link
Author

Oooh OK no problem. That's sad, your crate looks great ! I hope Windows support will happen soon.
Thanks for answering and helping me.

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

No branches or pull requests

2 participants