Live data from Hacker News

The JavaScript Oxidation Compiler

oxc.rs

11–20 of 147 posts

Re: The JavaScript Oxidation Compiler

#11

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?

Oxidation of iron produces rust. Rust is the language of implementation of that compiler, and of the entire Oxc suite.

Re: The JavaScript Oxidation Compiler

#12
post #8

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

Deno is a native implementation of a standard library, it doesn't have language implementation of its own, it just bundles the one from Safari (javascriptcore).

This is a set of linting tools and a typestripper, a program that removes the type annotations from typescript to make turn it into pure javascript (and turn JSX into document.whateverMakeElement calls). It still doesn't have anything to actually run the program.

Re: The JavaScript Oxidation Compiler

#13
post #8

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

No, it it a suite of tools to handle Typescript (and Javascript as its subset). So far it's a parser, a tool to strip Typescript declarations and produce JS (like SWC), a linter, and a set of code transformation tools / interfaces, as much as I can tell.

Re: The JavaScript Oxidation Compiler

#15
post #8

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

Oxc is not a JavaScript runtime environment; it's a collection of build tools for JavaScript. The tools output JavaScript code, not native binaries. You separately need a runtime environment like Deno (or a browser, depending on what kind of code it is) to actually run that code.

Re: The JavaScript Oxidation Compiler

#16
post #8

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

Deno is a native implementation of a standard library, it doesn't have language implementation of its own, it just bundles the one from Safari (javascriptcore). This is a set of linting tools and a typestripper, a program that removes the type annotations from typescript to make turn it into pure javascript (and turn JSX into document.whateverMakeElement calls). It still doesn't have anything to actually run the prog…

Deno uses V8, which is from Chrome. Bun uses JavaScriptCore.

Re: The JavaScript Oxidation Compiler

#19
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.

Post reply on HN