Metadata-Version: 2.4
Name: refactrail-core
Version: 0.4.0a0
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
License-File: LICENSE
License-File: THIRD_PARTY_LICENSES/aho-corasick-1.1.5/COPYING
License-File: THIRD_PARTY_LICENSES/aho-corasick-1.1.5/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/aho-corasick-1.1.5/UNLICENSE
License-File: THIRD_PARTY_LICENSES/cc-1.5.1/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/cc-1.5.1/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/crossbeam-deque-0.8.8/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/crossbeam-deque-0.8.8/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/crossbeam-epoch-0.9.21/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/crossbeam-epoch-0.9.21/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/crossbeam-utils-0.8.23/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/crossbeam-utils-0.8.23/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/either-1.18.0/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/either-1.18.0/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/find-msvc-tools-0.1.14/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/find-msvc-tools-0.1.14/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/heck-0.5.0/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/heck-0.5.0/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/index.json
License-File: THIRD_PARTY_LICENSES/libc-0.2.189/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/libc-0.2.189/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/libmimalloc-sys-0.1.49/LICENSE.txt
License-File: THIRD_PARTY_LICENSES/memchr-2.8.3/COPYING
License-File: THIRD_PARTY_LICENSES/memchr-2.8.3/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/memchr-2.8.3/UNLICENSE
License-File: THIRD_PARTY_LICENSES/mimalloc-0.1.52/LICENSE.txt
License-File: THIRD_PARTY_LICENSES/once_cell-1.21.4/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/once_cell-1.21.4/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/portable-atomic-1.15.0/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/portable-atomic-1.15.0/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/proc-macro2-1.0.107/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/proc-macro2-1.0.107/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/pyo3-0.29.3/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/pyo3-0.29.3/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/pyo3-build-config-0.29.3/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/pyo3-build-config-0.29.3/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/pyo3-ffi-0.29.3/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/pyo3-ffi-0.29.3/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/pyo3-macros-0.29.3/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/pyo3-macros-0.29.3/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/pyo3-macros-backend-0.29.3/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/pyo3-macros-backend-0.29.3/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/quote-1.0.47/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/quote-1.0.47/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/rayon-1.12.0/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/rayon-1.12.0/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/rayon-core-1.13.0/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/rayon-core-1.13.0/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/regex-1.13.1/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/regex-1.13.1/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/regex-automata-0.4.18/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/regex-automata-0.4.18/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/regex-syntax-0.8.11/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/regex-syntax-0.8.11/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/shlex-2.0.1/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/shlex-2.0.1/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/syn-2.0.119/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/syn-2.0.119/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/target-lexicon-0.13.5/LICENSE
License-File: THIRD_PARTY_LICENSES/unicode-ident-1.0.26/LICENSE-APACHE
License-File: THIRD_PARTY_LICENSES/unicode-ident-1.0.26/LICENSE-MIT
License-File: THIRD_PARTY_LICENSES/unicode-ident-1.0.26/LICENSE-UNICODE
Summary: Rust engine for RefacTrail, the Python refactorizer: the same results as its Python engine
Keywords: python,refactorizer,linter,formatter,rust,parser,static-analysis
Author: Sambit Supriya Dash
License-Expression: MIT
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/SAMtheROCKET/refactrail
Project-URL: Issues, https://github.com/SAMtheROCKET/refactrail/issues
Project-URL: Repository, https://github.com/SAMtheROCKET/refactrail

# refactrail-core

The Rust engine for [RefacTrail](https://github.com/SAMtheROCKET/refactrail),
the Python refactorizer. It makes `refactrail check`, `lint` and `format`
faster with output identical to RefacTrail's Python engine, and is
installed automatically with RefacTrail.

The engine is RefacTrail's own: a Rust lexer, parser, compile checks and
symbol table, written from the language reference with CPython 3.12 as the
test oracle. It contains no Ruff code. Neither engine imports or executes
the checked source. CPython is asked only for the exact message of a file
that fails to compile, so both engines report it identically.

Native wheels (CPython 3.12+ ABI3) cover Windows x86_64, macOS (Apple
silicon and Intel) and Linux x86_64 and ARM64 (glibc and musl). On any
other system pip installs this project's small pure-Python fallback wheel
instead, and RefacTrail uses its Python engine, so installation never
needs Rust. `--engine auto` (the default) uses the native engine when
present; `--engine rust` requires it. Parity tests cover the recorded corpora and fuzzed inputs,
not every possible Python program.

Build a wheel with `maturin build --release --locked`. Building requires
Rust and the locked Cargo dependencies. Release builds must rerun the
parent package's tests and the parity scripts.

The core's own code is MIT licensed. Dependency notices and their upstream
license declarations are in `THIRD_PARTY_LICENSES`, with an index;
regenerate them with `scripts/gen_third_party_licenses.py`. Local build
commands upload nothing.

