HEnquist / wasapi-rs

Simple Wasapi bindings for Rust
MIT License
47 stars 12 forks source link

Does wasapi-rs require nightly? #11

Closed SecondFlight closed 2 years ago

SecondFlight commented 2 years ago

I've cloned this repository and run cargo run --exapmle playsine. Doing this gave the following error:

   ...
   Compiling windows v0.33.0
error[E0554]: `#![feature]` may not be used on the stable release channel
 --> C:\Users\qbgee\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-0.33.0\src\lib.rs:5:36
  |
5 | #![cfg_attr(feature = "implement", feature(const_fn_fn_ptr_basics))]
  |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> C:\Users\qbgee\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-0.33.0\src\lib.rs:6:36
  |
6 | #![cfg_attr(feature = "implement", feature(const_fn_trait_bound))]
  |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0554`.
error: could not compile `windows` due to 2 previous errors

Is wasapi-rs meant to require unstable/nightly, or might this be an error on my side?

I'm using Rust stable v1.59.0.

HEnquist commented 2 years ago

The latest versions of the windows crate requires nightly if the optional feature for implementing com interfaces is enabled. Since wasapi-rs uses that it means nightly is required here too. They are doing their best to get the things needed stabilized, so expect this to change soon. See https://github.com/microsoft/windows-rs/issues/1523

SecondFlight commented 2 years ago

Thanks for the reply and the issue link! I'll add that issue to my watch list.

HEnquist commented 2 years ago

https://github.com/HEnquist/wasapi-rs/pull/12 With windows-rs 0.34 the stable compiler can be used as soon as rustc 1.61 is released. Nightly is still needed until then.