https://github.com/keller-mark/oxc-py
https://github.com/keller-mark/oxc-py
hidivelab
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/keller-mark/oxc-py
- Owner: keller-mark
- Created: 2025-02-26T14:31:23.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-26T17:03:39.000Z (3 months ago)
- Last Synced: 2025-02-26T17:31:04.960Z (3 months ago)
- Topics: hidivelab
- Language: Rust
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# oxc-py
[](https://pypi.org/project/oxc_py)
Python bindings to the [oxc](https://github.com/oxc-project/oxc) [transformer](https://github.com/oxc-project/oxc/tree/main/crates/oxc_transformer).
For the `esbuild` equivalent, see [esbuild-py](https://github.com/keller-mark/esbuild-py).
## Usage
```py
from oxc_py import transformjsx = """
import * as React from 'react'
import * as ReactDOM from 'react-dom'ReactDOM.render(
Hello, world!
,
document.getElementById('root')
);
"""print(transform(jsx))
```## Development
### Setup
```sh
uv venv
source .venv/bin/activate
uv sync --extra dev
```### Test
```sh
uv run pytest
```## Resources
- https://github.com/keller-mark/esbuild-py
- https://github.com/oxc-project/oxc/blob/71155cf575b6947bb0e85376d18375c2f3c50c73/crates/oxc_transformer/examples/transformer.rs
- https://docs.rs/oxc_transformer/0.53.0/oxc_transformer/
- https://www.maturin.rs/tutorial.html