logoalt Hacker News

The JavaScript Oxidation Compiler

237 pointsby modinfotoday at 2:49 AM129 commentsview on HN

Comments

owickstromtoday at 8:01 AM

I'm using oxc_traverse and friends to implement on-the-fly JS instrumentation for https://github.com/antithesishq/bombadil and it has been awesome. That in combination with boa_engine lets me build a statically linked executable rather than a hodgepodge of Node tools to shell out to. Respect to the tools that came before but this is way nicer for distribution. Good times for web tech IMO.

pier25today at 4:37 AM

All the Void Zero projects are super cool although I still wonder how they’re going to monetize all this.

show 3 replies
Grom_PEtoday at 9:46 AM

I thought oxfmt would just be a faster drop-in replacement for "biome format"... It wasn't.

Let this be a warning: running oxfmt without any arguments recursively scans directory tree from the current directory for all *.js and *.ts files and silently reformats them.

Thanks to that, I got a few of my Allman-formatted JavaScript files I care about messed up with no option to format them back from K&R style.

show 9 replies
philipptatoday at 9:43 AM

It always comes as a surprise to me how the same group of people who go out of their way to shave off the last milliseconds or microseconds in their tooling care so little about the performance of the code they ship to browsers.

Not to discredit OP's work of course.

show 4 replies
apatheticoniontoday at 5:39 AM

I wrote a simple multi threaded transpiler to transpile TypeScript to JavaScript using oxc in Rust. It could transpile 100k files in 3 seconds.

It's blisteringly fast

show 1 reply
root_axistoday at 5:01 AM

I'm surprised to see it's that much faster than SWC. Does anyone have any general details on how that performance is achieved?

show 1 reply
sankalpmukimtoday at 4:53 AM

I wonder why did it take so long for someone to make something(s) this fast when this much performance was always available on the table. Crazy accomplishment!

show 5 replies
vivzkestreltoday at 3:26 PM

- seeing this oxlint and oxfmt a lot lately

- how does it compare to biome?

- also biome does all 3 , linting, formatting and sorting, why do you want 3 libraries to do the job biome does alone?

galaxyLogictoday at 7:01 AM

Does oxc-parser make it easy to remove comments from JavaScript?

In other words does it treat comments as syntactic units, or as something that can be ignored wince they are not needed by the "next stage"?

The reason to find out what the comments are is of course to make it easy to remove them.

show 1 reply
wiseowisetoday at 10:20 AM

So uv for JavaScript? Nice.

show 1 reply
hu3today at 6:42 AM

I expected a coparison to `bun build` in the transformer TS -> JS part.

But I guess it wouldn't be an apples to apples com parison because Bun can also run typescript directly.

show 1 reply
zdwtoday at 5:02 AM

This compiles to native binaries, as opposed to deno which is also in rust but is more an interpreter for sandboxed environments?

show 4 replies
lerp-iotoday at 8:57 AM

whats the point of writing rust memory safe for js if js is already memory safe, ant u just write it in js???

show 1 reply
sneaktoday at 6:34 AM

Thought this was something related to Oxide Computer - they might want to be careful with that branding.

show 1 reply
latchkeytoday at 5:48 AM

I've played with all of these various formatters/linters in my workflow. I tend to save often and then have them format my code as I type.

I hate to say it, but biome just works better for me. I found the ox stuff to do weird things to my code when it was in weird edge case states as I was writing it. I'd move something around partially correct, hit save to format it and then it would make everything weird. biome isn't perfect, but has fewer of those issues. I suspect that it is hard to even test for this because it is mostly unintended side effects.

ultracite makes it easy to try these projects out and switch between them.

show 1 reply
RealityVoidtoday at 7:06 AM

For the love of god, please stop naming Rust projects with "corrosion" and "oxidation" and the cute word pwns related to Rust because they are currently overplayed.

show 1 reply
wangzhongwangtoday at 5:47 AM

[dead]

show 3 replies
Ecko123today at 4:44 AM

[dead]

zenon_paradoxtoday at 3:22 AM

[dead]

robofanatictoday at 5:30 AM

oxidation is a chemical process where a substance loses electrons, often by reacting with oxygen, causing it to change. What does it have to do with JavaScript?

show 2 replies