Skip to content

Rework binding generation to reduce boilerplate#1

Draft
wolfd wants to merge 11 commits intodanielstuart14:masterfrom
AutoPallet:wolfd/revup/master/vendor-submodule
Draft

Rework binding generation to reduce boilerplate#1
wolfd wants to merge 11 commits intodanielstuart14:masterfrom
AutoPallet:wolfd/revup/master/vendor-submodule

Conversation

@wolfd
Copy link
Copy Markdown

@wolfd wolfd commented Mar 4, 2026

This is a pretty big (breaking!) change.

  • Update OrbbecSDK submodule, vendor in crate
  • Rework binding generation to change how properties work.
  • Add macros for common patterns of calling orbbec sdk functions.

I've also collapsed the other PRs on this repo into this one, with
separate commits for each.

The first commit updates the OrbbecSDK submodule, and changes the build
process to vendor the contents of the OrbbecSDK folder into the crate.

Caveat: OrbbecSDK writes out a couple files to its source directory, so
we need to copy the whole source directory to OUT_DIR before building.

The next commit reworks the binding generation to use Rust-y enums
instead of raw integers. In many cases, we're now using the rust enums
directly in the public API. This isn't complete, since I would like to
rename struct members too (see rust-lang/rust-bindgen#3358).

The third commit adds macros for common patterns of calling the C SDK
functions, and rewrites all of the current calls to the C SDK to use
them.

I think my vision is to further reduce the sys/ layer so that src/ does
most of the work.

The rest of the commits are adding various features to the public API.

Topic: vendor-submodule

@wolfd
Copy link
Copy Markdown
Author

wolfd commented Mar 4, 2026

Reviews in this chain:
#1 Rework binding generation to reduce boilerplate

@wolfd
Copy link
Copy Markdown
Author

wolfd commented Mar 4, 2026

# head base diff date summary
0 881f0586 d28b0aad diff Mar 4 0:27 AM 4 files changed, 46 insertions(+), 7 deletions(-)
1 8bcfa024 d28b0aad diff Apr 3 22:13 PM 34 files changed, 8198 insertions(+), 7324 deletions(-)

@wolfd
Copy link
Copy Markdown
Author

wolfd commented Apr 1, 2026

I 100% forgot to update the bindgen bindings in this PR.
(Edit: the bindings are completely different now).

wolfd added 11 commits April 1, 2026 16:32
This is a pretty big (breaking!) change.
- Update OrbbecSDK submodule, vendor in crate
- Rework binding generation to change how properties work.
- Add macros for common patterns of calling orbbec sdk functions.

I've also collapsed the other PRs on this repo into this one, with
separate commits for each.

The first commit updates the OrbbecSDK submodule, and changes the build
process to vendor the contents of the OrbbecSDK folder into the crate.

Caveat: OrbbecSDK writes out a couple files to its source directory, so
we need to copy the whole source directory to OUT_DIR before building.

The next commit reworks the binding generation to use Rust-y enums
instead of raw integers. In many cases, we're now using the rust enums
directly in the public API. This isn't complete, since I would like to
rename struct members too (see rust-lang/rust-bindgen#3358).

The third commit adds macros for common patterns of calling the C SDK
functions, and rewrites all of the current calls to the C SDK to use
them.

I think my vision is to further reduce the sys/ layer so that src/ does
most of the work.

The rest of the commits are adding various features to the public API.

Topic: vendor-submodule
Also updates bindings to match new Orbbec SDK

Topic: vendor-submodule
Allow getting the three different timestamp values from a frame, as well
as enabling the global timestamp feature.

Topic: vendor-submodule
It turns out that this is basically just 1000, but I wasn't sure.

Topic: vendor-submodule
Allows fetching width/height/fps/format on video streams.

Topic: vendor-submodule
This makes it possible to prevent the SDK from creating a `Log`
directory in the current working directory.

Topic: vendor-submodule
@wolfd wolfd changed the title Update OrbbecSDK submodule, vendor in crate Rework binding generation to reduce boilerplate Apr 3, 2026
@wolfd wolfd force-pushed the wolfd/revup/master/vendor-submodule branch from 881f058 to 8bcfa02 Compare April 3, 2026 22:13
@wolfd wolfd marked this pull request as draft April 3, 2026 22:45
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.

1 participant