examples/RustCrateMacroPyO3Only.jl: a PyO3-only crate bound with @rust_crate at a package's top level - #359
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5163977f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…t_crate at a package's top level A self-contained example package that binds a PyO3-only crate — no RustCall attribute, no `juliacall_macros` dependency — with a single `@rust_crate ... submodule="Bindings"` at the package's top level, so the bindings module is generated while the package is precompiled (#339) instead of written to a file by a `deps/build.jl` as examples/SampleCratePyO3Only.jl does. Same crate shape, the other front door. - examples/RustCrateMacroPyO3Only.jl/: Project.toml (RustCall only, compat `RustCall = "0.3.1"` — the first release whose `@rust_crate` has `submodule=`; 0.3.0 would not define `Bindings`), src, an `rlib` crate with a mandatory pyo3 (the wrapper links libpython), 37 tests, README. - .github/workflows/Examples.yml: the package in the matrix. - examples/README.md: the example listed. Its CHANGELOG entry landed with the v0.3.1 release (#360), which had to precede this so the compat bound resolves against the checkout. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014iJ1dZ7KEebWDjdY7fhPbw
a516397 to
b402fb5
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b402fb5655
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…view) i32::MIN / -1 panics in Rust even in release builds, so checked_div bypassed its PyResult error path and safe_div surfaced a RuntimeError instead of the documented DivideError. The crate uses i32::checked_div now (zero -> PyZeroDivisionError, overflow -> PyOverflowError); tests cover both the raw Err and the Julia-side DivideError for typemin(Int32) ÷ -1; README and the safe_div docstring say so. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014iJ1dZ7KEebWDjdY7fhPbw
|
@codex review |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014iJ1dZ7KEebWDjdY7fhPbw
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
A self-contained example package that binds a PyO3-only crate — no RustCall attribute, no
juliacall_macrosdependency — with a single@rust_crate ... submodule="Bindings"at the package's top level, so the bindings module is generated while the package is precompiled (#339, merged in #351) instead of being written to a file by adeps/build.jlasexamples/SampleCratePyO3Only.jldoes. The crate is identical in shape to that example's; only the front door differs, which is the point of having both.examples/RustCrateMacroPyO3Only.jl/:Project.toml(RustCall only — noLibdl, the generated module reaches it through RustCall),src/RustCrateMacroPyO3Only.jl(@rust_crate joinpath(@__DIR__, "..", "deps", "macro_pyo3_only") submodule="Bindings"and re-exports),deps/macro_pyo3_only/(anrlibcrate with a mandatorypyo3 = { default-features = false, features = ["macros"] }, the shape most real PyO3 crates have; the wrapper links libpython),test/runtests.jl(37 tests: functions, a#[pyclass]with methods,Result/Optionreturns, and that the package is precompiled and its bindings live under the package, notMain), README (what the example shows, what it needs — a Python with a linkablelibpython— and how it differs from thebuild.jlexample)..github/workflows/Examples.yml: the new package in the matrix.examples/README.md,CHANGELOG.md: the example listed.Verified locally on top of
11fa2bf:Pkg.test()of the example passes (37/37); the Examples workflow runs it on the three platforms.Advances #339's documentation; no acceptance criterion of an open issue is claimed.
🤖 Generated with Claude Code
https://claude.ai/code/session_014iJ1dZ7KEebWDjdY7fhPbw