Skip to content

build: bump tools/rust_api to package the single-file header script - #1081

Merged
adsharma merged 1 commit into
LadybugDB:mainfrom
kory-io:build/bump-rust-api-packaging-fix
Sep 30, 2026
Merged

adsharma merged 1 commit into
LadybugDB:mainfrom
kory-io:build/bump-rust-api-packaging-fix

Conversation

@kory-io

@kory-io kory-io commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

lbug 0.21.1 on crates.io still can't be built from source (LBUG_BUILD_FROM_SOURCE=1):

make[2]: *** No rule to make target `.../lbug-0.21.1/lbug-src/scripts/collect-single-file-header.py', needed by `src/lbug.hpp'.  Stop.

The fix was merged in LadybugDB/ladybug-rust#43 (28aba1c4). The crate is packaged from this repo's tools/rust_api submodule, though, which is still pinned at ca706e51, one commit before the fix. So 0.21.0, 0.21.0-pre.20260929 and 0.21.1 all ship the old include list: build.rs turns BUILD_SINGLE_FILE_HEADER on, but lbug-src/scripts/collect-single-file-header.py and headers.txt aren't in the package.

Fix

Bump tools/rust_api from ca706e51 to 28aba1c4. That commit's only change is the packaging fix: the two script files are added to package.include, with matching rerun-if-changed lines.

Verification

A 0.21.2 from this commit would let crates that build from source use 0.21.

@adsharma
adsharma merged commit 9d4598a into LadybugDB:main Sep 30, 2026
4 checks passed
@kory-io

kory-io commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

@adsharma Thanks for merging this! Since 0.21.1 was cut just before it, the published crate still can't build from source. Would it be possible to cut a 0.21.2 when you get a chance? Happy to help test it.

@adsharma

Copy link
Copy Markdown
Contributor

@kory-io if you're building from source why not build from ladybug-rust git repo?

@kory-io

kory-io commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @adsharma! We did try that. A git dependency on ladybug-rust alone doesn't include the C++ sources (lbug-src is only added at publish time), and pointing at the ladybug repo instead doesn't find them either on macOS/Linux, because the in-repo ../.. fallback in get_lbug_root() is Windows-only. So either way it needs LBUG_SOURCE_DIR.

For now we're building against a v0.21.1 checkout with LBUG_SOURCE_DIR, and that works fine. A 0.21.2 would still be nice, since it lets our CI build from the crate alone. I'm also happy to send a small PR enabling that ../.. fallback on all platforms, so git dependencies build out of the box, if that's useful.

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