kevinmehall / rust-soapysdr

Rust bindings for SoapySDR, the vendor-neutral software defined radio hardware abstraction layer
Apache License 2.0
75 stars 22 forks source link

Support Windows in soapy-sdr-stream #29

Closed tommy-gilligan closed 1 year ago

tommy-gilligan commented 1 year ago

Currently soapy-sdr-stream cannnot be built on Windows because Windows does not have signals. This is breaking https://github.com/kevinmehall/rust-soapysdr/pull/28 which added building soapy-sdr-stream on CI (it wasn't before) Because it is just SIGINT that we are handling, the ctrlc crate is a suitable cross-platform replacement for signalbool.

kevinmehall commented 1 year ago

Thanks for pointing out that it doesn't build on Windows. It looks like signalbool supports Windows as long as you use the Flag::Restart option instead of Flag::Interrupt, so I went with that in https://github.com/kevinmehall/rust-soapysdr/pull/30. ctrlc using a thread just to listen for signals is kind of silly, though it really doesn't matter much.

Not sure if you're using this on Windows or just ran into it with your CI changes, but if you are a Windows user, let me know if that works for you. (I've only built it on GitHub Actions).

tommy-gilligan commented 1 year ago

ctrlc using a thread just to listen for signals is kind of silly, though it really doesn't matter much.

Ahh, I didn't notice this

Not sure if you're using this on Windows or just ran into it with your CI changes, but if you are a Windows user, let me know if that works for you. (I've only built it on GitHub Actions).

Sorry, I intended to mention that I am using Mac but forgot. So the work here was not properly tested.

I'll check if #19 is still valid.