logoalt Hacker News

The JavaScript Oxidation Compiler

146 pointsby modinfotoday at 2:49 AM51 commentsview on HN

Comments

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???

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 1 reply
wangzhongwangtoday at 5:47 AM

Interesting to see more Rust-based JS tooling. The performance gains are real but I'm curious about the ecosystem compatibility - does it handle all the weird edge cases that existing tools have learned over the years?

Also wondering if this could eventually replace parts of the webpack/vite pipeline or if it's more focused on the compilation step.

show 2 replies
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
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
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 3 replies
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
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.

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 3 replies
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
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.

Ecko123today at 4:44 AM

[dead]

zenon_paradoxtoday at 3:22 AM

[dead]

sneaktoday at 6:34 AM

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

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