Skip to content

feat: #242 create oxvg_jsx - #243

Merged
noahbald merged 5 commits into
mainfrom
feat/242-oxvg_jsx
Jul 29, 2026
Merged

noahbald merged 5 commits into
mainfrom
feat/242-oxvg_jsx

Conversation

@noahbald

@noahbald noahbald commented Jul 27, 2026 •

Copy link
Copy Markdown
Owner

Description

This PR adds a crate, package, and cli command similar to SVGR.

Motivation and Context

I thought it would be useful to have an alternative to SVGR (and @svgo/jsx) which is greatly popular but also not closely maintained.

The author himself mentions that future features should be built in Rust.

Additional thanks to Devon for passing on his implementation in Parcel for reference.

How Has This Been Tested?

  • Extensive unit tests in oxvg_jsx and basic tests in @oxvg/jsx
  • The oxvg jsx command is tested manually

Benchmarks

OXVG is at least 75x faster than SVGR in cli usage

---
config:
    xyChart:
        width: 622
        height: 181
        showDataLabel: true

---
xychart horizontal
    title "Average build time (ms) in Oxygen icon theme"
    x-axis [svgr, "svgr --no-svgo", "oxvg jsx", "oxvg jsx --no-oxvg"]
    y-axis "Files (#)" 0 --> 163
    bar [154.3, 162.4, 3.4, 2.2]
Loading
timeit { node ./svgr/packages/cli/bin/svgr --out-dir ~/Projects/oxygen-jsx -- oxygen }
timeit { ./oxvg/target/release/oxvg jsx --no-warn -r -o ~/Projects/oxygen-jsx/ ./oxygen/ }

Types of changes

Fixes

  • oxvg_ast::roxmltree parses with FnOnce isntead of FnMut

Features

  • Adds oxvg_jsx crate
  • Adds @oxvg/jsx package
  • Adds oxvg jsx command

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@noahbald noahbald self-assigned this Jul 27, 2026
@noahbald
noahbald force-pushed the feat/242-oxvg_jsx branch 5 times, most recently from e49203d to 0e24b20 Compare July 28, 2026 13:25
@noahbald
noahbald force-pushed the feat/242-oxvg_jsx branch 2 times, most recently from 3d1f9d8 to 775436f Compare July 28, 2026 21:58
@noahbald
noahbald force-pushed the feat/242-oxvg_jsx branch 4 times, most recently from 8bf1502 to f165c94 Compare July 29, 2026 07:07
@noahbald
noahbald force-pushed the feat/242-oxvg_jsx branch from f165c94 to 4b35785 Compare July 29, 2026 07:52
@noahbald
noahbald merged commit 9a13513 into main Jul 29, 2026
33 of 34 checks passed
@noahbald
noahbald deleted the feat/242-oxvg_jsx branch July 29, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant