Repository navigation
Groundwork: split device.rs into transport and enumeration - #160
Merged
Merged
Conversation
A byte guard records every frame and short command the builders emit for a fixed list of calls, a CLI guard records the help text of every subcommand, and the release dry run lists the files of every package. The workspace move must leave all three unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Taken from the package-contents artifact of the release dry run of this pull request: the files of the deb, rpm, Arch and tarball packages for both architectures. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The library modules move to crates/obsbot-device, models.rs as registry.rs, and the 0.13 CLI and daemon to crates/obsbot4linux, which keeps the package name, the binary and the package metadata. Version, rust-version and licence come from [workspace.package]. No behaviour change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
frame.rs and streaming.rs move unchanged; lib.rs keeps their old paths as re-exports until the final path change of the groundwork stage. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The device, its ioctls and the extension-unit access move to transport/uvc.rs; finding the camera (by-id links, card name) moves to enumeration.rs with its test. Every block is copied unchanged. lib.rs keeps the old device path as a re-export until the final path change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
nofuturekid
force-pushed
the
fix/148-groundwork-transport
branch
from
November 13, 2026 11:48
46ebb3e to
7d5e683
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #148
Stacked on #157 (branch
fix/146-groundwork-workspace); the diff against that branch is the single commit on top. Base isrebuild.What changed
Pure move, no behaviour change.
device.rsis split as the groundwork plan (Task 4) describes:crates/obsbot-device/src/device.rsis renamed (git mv) tocrates/obsbot-device/src/transport/uvc.rs; it keeps the extension-unit queries, the V4L2 controls, the lock and theDevicetype with its tests.crates/obsbot-device/src/enumeration.rstakes the camera detection (V4L2_CAP_META_CAPTURE,V4l2Capability,vidioc_querycap,Detected,card_name,detect,first_by_id) and the by-id test.crates/obsbot-device/src/transport/mod.rsis new (pub mod uvc;).crates/obsbot-device/src/lib.rs: only thedevice/registrygroup changes.enumeration,registry,transportand an inlinepub mod devicere-export (Detected,detect,CtrlRange,Device) keep the 0.13 path valid.scripts/groundwork/split-device.pyis the committed split script: it copies contiguous line ranges of the 0.13 file unchanged. Run aftergit mv, thenrustfmt --edition 2024on the two files.No byte sent to the camera, no ioctl, no timing and no CLI output changes. No CHANGELOG line (not user-visible).
How it was verified
cargo fmt --checkclean;cargo clippy --workspace --all-targets --locked -j 3 -- -D warningsclean;cargo test --workspace --locked -j 3passes (118, 1, 25, 2, 0 tests);shellcheck scripts/groundwork/*.sh scripts/package-contents.shandactionlintclean.scripts/groundwork/test-names.shfor base and head both list 146 tests;comm -3prints nothing.byte-guard.txtandcli-surface.txtare not in the diff.scripts/groundwork/move-check.sh <base> HEADprints exactly the 12 lines the plan lists (#[cfg(test)], the EUPL note, two SPDX lines, thetransportandenumerationmodule docs (3 lines), thedevicere-export doc comment,mod tests {,pub mod device {and two closing braces).ioctl_read!/ioctl_readwrite!/ layout-struct matches;enumeration.rsholdsV4l2Capabilityandvidioc_querycap(b'V', 0),transport/uvc.rsholdsUvcXuControlQuery,V4l2Control,V4l2QueryCtrlanduvcioc_ctrl_query(b'u', 0x21),vidioc_g_ctrl(27),vidioc_s_ctrl(28),vidioc_queryctrl(36), each exactly once with its 0.13 numbers.git mv, the script from this commit,rustfmt --edition 2024;diffoftransport/uvc.rsandenumeration.rsagainst this head prints nothing.git diff -M --statshowsdevice.rs => transport/uvc.rsas a rename.scripts/changed) run in CI on this pull request.🤖 Generated with Claude Code