orottier / web-audio-api-rs

A Rust implementation of the Web Audio API, for use in non-browser contexts
https://docs.rs/web-audio-api/
MIT License
300 stars 16 forks source link

Disable all dependencies for compilation-only test? #513

Closed fzyzcjy closed 5 months ago

fzyzcjy commented 5 months ago

Hi thanks for the library! I am trying to make it a part of test of https://github.com/fzyzcjy/flutter_rust_bridge to test flutter_rust_bridge's ability of automatically scanning and converting third party crates. Therefore, it would be great if it is possible to disable all dependencies for compilation-only (and not to be really run) test.

orottier commented 5 months ago

Hey, thanks for the report, but I'm not sure I understand. You can't compile a rust crate without its dependencies.

We do offer the ability to use this crate without audio backend (disable the "cpal" feature) and without media decoder capabilities (the "mp3", "ogg", "flac", "wav", "m4a", "alac" features.

So compiling with default-features = false still leaves quite a few dependencies. You can use cargo tree --no-default-features --edges no-dev to inspect them.

Looking a those, I could also make creek and its transitive dependencies an optional feature (it is used for the HtmlMediaElement features) if that helps.

fzyzcjy commented 5 months ago

Yes that looks like what I need, thank you!