ruff
ruff copied to clipboard
Expose Ruff's public API as a Python library
See https://github.com/charliermarsh/ruff/issues/659
- [x] Accept options (need to check what a good way here is, either just a partial dictionary similar to WASM, or proper classes with type hints?)
- [ ] Configure and document testing
- [ ] Include in CI
- [x] Build a wheel with binary and library
- [x] Finalize what the API exactly is (https://github.com/charliermarsh/ruff/pull/1407#discussion_r1057768626)
Most pieces are in place. Since maturin doesn't support binary+library in one package (at least I didn't find a way), I had to switch to the lower-level setuptools-rust. I need to do some more CI adjustments for that, so I'll be moving that into a separate PR.
Sweet! I haven't reviewed yet, but @messense, do you know if Maturin can be used here to build a binary + library in one package?
I haven't reviewed yet
For the record, it's also not in a state where I'm waiting for a review. I can still do some cleaning up, adding docs and function signatures to the library, adjust CI etc.
do you know if Maturin can be used here to build a binary + library in one package?
Not yet, supporting both lib and bin will complicate bindings detection and our auditwheel Rust implementation, but it's been worked on slowly.
I really think that this is too soon ... we have not even stabilized the Rust API ... I have been refactoring our Rust API a lot recently but it's still very much not ready to be used by any third party, since it's very much subject to change drastically.
Yeah, I agree -- I was excited for this but I've realized that it's too soon. Let's close for now, since it's getting a bit stale anyway.