Skip to content

Add buildinfo() Python method#172

Merged
simu merged 1 commit into
mainfrom
feat/buildinfo
Jul 8, 2025
Merged

Add buildinfo() Python method#172
simu merged 1 commit into
mainfrom
feat/buildinfo

Conversation

@simu
Copy link
Copy Markdown
Member

@simu simu commented Jul 8, 2025

This currently returns a dict with a single entry for the rustc version.

We do this because the Rust compiler doesn't embed its own version into the resulting library on macOS (not sure about Windows), so we can't reliably extract the compiler version that was used to build reclass-rs from the library .so.

The implementation uses a Rust build script (build.rs) which uses the rustc_version crate to get the Rust compiler's version. For now, the crate just provides a convenience wrapper for calling rustc --version, but would allow us to access more structured compiler info in the future.

We will use this for projectsyn/commodore#1172

Checklist

  • The PR has a meaningful title. The title will be used to auto generate the changelog
  • PR contains a single logical change (to build a better changelog).
  • Update tests.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency, internal
    as they show up in the changelog
  • Link this PR to related PRs or issues.

@simu simu added the enhancement New feature or request label Jul 8, 2025
@simu simu requested a review from a team July 8, 2025 07:59
@github-actions

This comment was marked as outdated.

@simu simu force-pushed the feat/buildinfo branch from 42d849e to b7fbbf5 Compare July 8, 2025 08:07
@github-actions

This comment was marked as outdated.

This currently returns a dict with a single entry for the rustc version.

We do this because the Rust compiler doesn't embed its own version into
the resulting library on macOS (not sure about Windows), so we can't
reliably extract the compiler version that was used to build reclass-rs
from the library `.so`.

The implementation uses a Rust build script (`build.rs`) which uses the
`rustc_version` crate to get the Rust compiler's version. For now, the
crate just provides a convenience wrapper for calling `rustc --version`,
but would allow us to access more structured compiler info in the
future.
@simu simu force-pushed the feat/buildinfo branch from b7fbbf5 to cba65ec Compare July 8, 2025 08:13
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 8, 2025

Benchmark for 0220833

Click to view benchmark
Test Base PR %
Reclass::inventory() multi-threaded 1746.1±111.41µs 1787.9±160.77µs +2.39%
Reclass::inventory() single-threaded 3.6±0.15ms 3.6±0.09ms 0.00%

@simu simu merged commit 4420323 into main Jul 8, 2025
22 checks passed
@simu simu deleted the feat/buildinfo branch July 8, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants