Skip to content

Libusb - #9

Closed
elmattic wants to merge 68 commits into
Blobfolio:masterfrom
elmattic:libusb
Closed

Libusb#9
elmattic wants to merge 68 commits into
Blobfolio:masterfrom
elmattic:libusb

Conversation

@elmattic

Copy link
Copy Markdown
Contributor

No description provided.

@elmattic elmattic mentioned this pull request Aug 30, 2026
4 tasks
@joshstoik1

Copy link
Copy Markdown
Member

Thanks @elmattic !

I just pushed a new release (0.6.1) with changes that more or less meet in the middle with what I had before and how your fork is set up:

  • I removed the default feature from the riprip_core library (to make it more easily controllable via riprip)
  • I renamed the CdioDriver type alias to CddaDriver (better differentiate it from all the libcdio names)
  • I refactored the common driver code into a CddaDriverExt trait
    • The trait automatically provides:
      • mcn
      • mcn_cdtext (a new wrapper that tries to read/format the value from CDText)
      • cache_bust
      • read_cd_c2
      • read_subchannel
    • The mcn__ method has been renamed to mcn_subchannel to make it clearer where it's looking for the data
  • There's a new drivers::set_bad_sector method that can be used to note bad reads (no need to work with the SHITLIST static directly anymore)
  • There's also a new crate::FRAMES_PER_SECOND constant in case you need to reference that anywhere

Do you think you'd be able to rebase your fork? Specifically, I'd like to see:

  1. A libusb crate feature added to riprip (a passthrough to core)
  2. A libusb crate feature added to riprip_core
  3. The usb module moved to drivers
  4. The facets folder moved to riprip_core/skel (to keep all miscellaneous assets in one place)
  5. The two compile_error! conditions at the top of drivers/mod.rs updated to accommodate a second choice (I left TODO comments)
  6. A conditional type alias assignment for the libusb feature
  7. The CddaDriverExt trait implemented for the driver

Please let me know if the trait or anything else needs to be tweaked to accommodate differences in libusb handling.

@elmattic

Copy link
Copy Markdown
Contributor Author

Hey @joshstoik1 !

That looks great! I’ll try to rebase my branch tomorrow and keep you posted.

@elmattic

elmattic commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Hey @joshstoik1 !

Turns out rebasing was more of a hassle than expected, so I figured it would be simpler to start from master. I put all the new usb driver code in a new branch, #10, and I propose we continue the discussion in the associated PR.

There are still a few things I’d like to clean up and make more robust, so I’ve left the PR as a draft for now.

Let me know if you think I’ve addressed all the points you had in mind. Thanks for your time!

@elmattic elmattic closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants