TST: add Rust extension module using PyO3#874
Conversation
d803b5c to
75b9ffa
Compare
824c371 to
5872020
Compare
This requires nightly Rust and unreleased Meson, and it currently bumps into a Meson warning: ``WARNING: Library entry portable_atomic has unexpected keys "doc-scrape-examples"``.
|
This almost works with unreleased Meson 1.12.0 and nightly Rust toolchain. The missing bit is translating the |
|
It did what it was intending to do:
It clearly needs more work to exactly match build.rs, possibly by someone that does have access to a Windows toolchain unlike you and I... |
|
As I was mentioning in the related issue, I get a segmentation fault on macOS when the extension module raises an error. I don't get the segfault when compiling with maturin. Thus there is something off in the compilation on macOS too. I haven't had time to investigate a way to compare the output of |
How to reproduce? It seems fine for me on osx-arm64: |
|
Ot just what are the missing flags from build.rs on macOS? |
|
I compared the extra_args += [
'--cfg', 'cfg_select',
'--cfg', 'const_is_null',
'--cfg', 'fn_ptr_eq',
'--cfg', 'from_bytes_with_nul_error',
]I didn't check what these are for. I cannot reproduce the segmentation fault now... With my knowledge of Rust and associated tooling and working on this in bits and pieces in between other things I probably made a mistake somewhere... |
|
I can possibly debug on windows in a few days' time, if someone can tell me roughly what to look for. |
|
Ok, those are easy as they are simply based on the rustc version. |
No description provided.