Switch to using an OS-independent serial layer #10
Replies: 1 comment 3 replies
-
|
Hey @penguin359! I believe you're right: the primary platform dependencies at the moment are the serial port and the USB hotplug implementations. I'm definitely open to seeing those work on macOS and even Windows. (However, I don't think it will ever be a top priority for the project to support those platforms.) Initially, I used the serialport crate. But as the project became more complex, I ended up with a custom implementation for a few reasons:
So, I'm open to a more portable implementation, but it probably won't be as straightforward as using serialport. But I'm happy to be proven wrong! I'm currently working on the driver for EmberOne, where the on-the-fly baud rate switching is more critical. (Interestingly, it's not necessary to switch to a higher speed for a Bitaxe Gamma's single chip.) You might have to wait a bit to see where this leads, so all the requirements are clear. USB hotplug might be a good starting point immediately. It's well-abstracted at the moment, but only has a Linux implementation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Before sitting down and writing some code, I thought I'd discuss this idea and see how receptive the team is to it. Looking through the codebase, it appears that the primary piece of it that is blocking it from compiling on Windows is the serial transport layer it uses. This should be straight-forward to implement on Windows as well and improve the cross-platform potential for this project. It could just be an alternate module which is selected conditionally; however, it might make more sense to use an already implemented crate for handling the cross-platform differences. The Rust serialport crate seems to be receiving regular updates although I haven't extensively evaluated it just yet. Would this be a good way to take this for a contribution to Mujina Miner?
Beta Was this translation helpful? Give feedback.
All reactions