rusb error: Operation not supported or unimplemented on this platform
rizwan92 opened this issue · 5 comments
i am using rusb with escpo-rs
rusb = { version = "0.8.1", features = ["vendored"] }
escpos-rs = { version = "0.3.1" }
facing this issue
Error: rusb error: Operation not supported or unimplemented on this platform
keeping rusb = 0.9.1
rusb = { version = "0.9.1", features = ["vendored"] }
escpos-rs = { version = "0.3.1" }
it gives below error
error: failed to select a version for `libusb1-sys`.
... required by package `rusb v0.9.1`
... which satisfies dependency `rusb = "^0.9.1"` of package `app v0.1.0 (C:\Users\irfan\Desktop\Mustafa\chikupos-software\src-tauri)`
versions that meet the requirements `^0.6.0` are: 0.6.4, 0.6.3, 0.6.2, 0.6.1, 0.6.0
the package `libusb1-sys` links to the native library `usb-1.0`, but it conflicts with a previous package which links to `usb-1.0` as well:
package `libusb1-sys v0.5.0`
... which satisfies dependency `libusb1-sys = "^0.5.0"` of package `rusb v0.8.1`
... which satisfies dependency `rusb = "^0.8.1"` of package `escpos-rs v0.3.1`
... which satisfies dependency `escpos-rs = "^0.3.1"` of package `app v0.1.0 (C:\Users\irfan\Desktop\Mustafa\chikupos-software\src-tauri)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='libusb1-sys' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.
failed to select a version for `libusb1-sys` which could resolve this conflict
About second one, escpos-rs use old version of rusb. So you mus use same version rusb as in escpos-rs
or update version inside escpos-rs
.
Firs one it's not rusb problem. You can try to look at google by LIBUSB_ERROR_NOT_SUPPORTED
how to update rusb version inside espos-rs ?? i need to talk to author or is there any way
You can always download escpos-rs and modify source code and after that specify dependency. Like escpos-rs = { path="path/to/you/version", version = "0.3.1" }
You can also patch dependencies without cloning:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html