Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ rustix = { version = "0.38", features = ["fs", "termios"] }
slotmap = "1.0"
tokio-udev = "0.10"
udev = "0.9"
core-foundation = "0.10"
io-kit-sys = "0.4"
mach2 = "0.4"
Comment on lines +48 to +50

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these versions are not the latest, any specific reason to prefer those?

utoipa = "5.4"
utoipa-axum = "0.2"
utoipa-swagger-ui = { version = "9.0", features = ["axum"] }
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ sudo apt-get install libudev-dev libssl-dev

### macOS

macOS support is planned, but USB discovery using IOKit is not yet implemented.
macOS is supported. USB discovery uses IOKit, which is part of the system
frameworks and requires no additional dependencies.

## Building

Expand Down
5 changes: 5 additions & 0 deletions mujina-miner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ ruint = "1.17.0"
tokio-udev = { workspace = true }
udev = { workspace = true }

[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = { workspace = true }
io-kit-sys = { workspace = true }
mach2 = { workspace = true }

[[bin]]
name = "mujina-minerd"
path = "src/bin/minerd.rs"
Expand Down
6 changes: 5 additions & 1 deletion mujina-miner/src/transport/usb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ impl UsbDeviceInfo {
{
linux::find_serial_ports_for_device(&self.device_path)
}
#[cfg(not(target_os = "linux"))]
#[cfg(target_os = "macos")]
{
macos::find_serial_ports_for_device(&self.device_path)
}
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
{
Ok(vec![])
}
Expand Down
Loading