[usbipdcpp] New port: A C++ library for creating usbip servers#50973
[usbipdcpp] New port: A C++ library for creating usbip servers#50973yunsmall wants to merge 1 commit into
Conversation
|
@microsoft-github-policy-service agree |
8b46118 to
1da552a
Compare
| "coroutine": { | ||
| "description": "Use C++20 coroutine-based implementation" | ||
| }, |
9a83e2d to
6ae4cd9
Compare
|
@vicroms Thank you for the review! I've made the following changes:
Regarding whether coroutine is an alternative: It's not a mutually exclusive alternative but an internal implementation detail (similar to bullet3's double/single precision feature), which is transparent to users. Also added a busywait feature for lower latency mode. |
6599ac3 to
065535f
Compare
dg0yt
left a comment
There was a problem hiding this comment.
FTR there is PR template for new ports, with a checklist.
0e6e2ff to
b8689d3
Compare
|
@dg0yt Thank you for the review! I've applied all the suggested changes:
Regarding the two targets: |
So the usage file unconditionally recommends a target which is subject to feature control. Users invited to make mistakes. Could you just drop the usage file? vcpkg tool's heuristical output will list the targets which are actually installed. The file also lacks a newline at the end. |
|
@dg0yt Done. I've removed the usage file and added |
056d83a to
5f38519
Compare
|
This still needs |
BillyONeal
left a comment
There was a problem hiding this comment.
- The port name follows the 'GitHubOrg-GitHubRepo' form or equivalent Owner-Project form (github.com/yunsmall/usbipdcpp).
This would mean the name should be yunsmall-usbipdcpp not just usbipdcpp
- The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
- Exactly one version is added in each modified versions file.
If this had been done, your builds would be green.
| ], | ||
| "features": { | ||
| "busywait": { | ||
| "description": "Enable busy-wait mode for lower latency" |
There was a problem hiding this comment.
Is this an alternative? Is there any reason we should not just always do this?
There was a problem hiding this comment.
busywait is a latency optimization feature that trades CPU efficiency for lower latency. It's not default behavior — only useful in specific low-latency scenarios. Most users don't need it.
There was a problem hiding this comment.
The way you describe it sounds like an alternative, not a feature. In particular, it sounds like a user could want to require that the feature is off which is not a thing features do. I think the port should pick one and this feature should not be added as a result.
| "libusb" | ||
| ] | ||
| }, | ||
| "virtual-device": { |
There was a problem hiding this comment.
Should we have this feature or just always do this? Just because the upstream build system has a thing does not mean we should expose them as features.
There was a problem hiding this comment.
The virtual device component adds build overhead and is only needed when creating software-emulated USB devices. Users who only forward physical devices via libusb don't need this. Upstream default is ON because examples depend on it, but for vcpkg users it should be opt-in.
There was a problem hiding this comment.
I'm not sure I agree; consider that package managers like apt et al. effectively only have one feature setting and people are fine with it. If it's not a substantial build time increase we may as well follow upstream's default. But in this case I'll defer to someone who clearly wants to actually use the library.
b9237e0 to
a0d0d32
Compare
15028de to
b668a03
Compare
BillyONeal
left a comment
There was a problem hiding this comment.
"Request changes" over the "busywait" feature looking like an alternative and the version database being broken.
| ], | ||
| "features": { | ||
| "busywait": { | ||
| "description": "Enable busy-wait mode for lower latency" |
There was a problem hiding this comment.
The way you describe it sounds like an alternative, not a feature. In particular, it sounds like a user could want to require that the feature is off which is not a thing features do. I think the port should pick one and this feature should not be added as a result.
| "libusb" | ||
| ] | ||
| }, | ||
| "virtual-device": { |
There was a problem hiding this comment.
I'm not sure I agree; consider that package managers like apt et al. effectively only have one feature setting and people are fine with it. If it's not a substantial build time increase we may as well follow upstream's default. But in this case I'll defer to someone who clearly wants to actually use the library.
e0899c3 to
1134fc9
Compare
|
@BillyONeal Thanks for the review. Here's what I've addressed:
Let me know if there's anything else. |
Summary
This PR adds a new port for usbipdcpp, a C++ library for creating USB/IP servers.
Features
Features available
coroutine: Use C++20 coroutine-based implementationlibusb: Build libusb-based server components for physical USB device forwardingUsage