Live data from Hacker News

Brimstone: ES2025 JavaScript engine written in Rust

github.com

11–20 of 125 posts

Re: Brimstone: ES2025 JavaScript engine written in Rust

#11
post #3
post #2

Could you compare it with Boa? It is written in Rust too. https://github.com/boa-dev/boa

I have some benchmark results here: https://ivankra.github.io/javascript-zoo/?v8=true It's impressively compliant, considering it's just a one man project! Almost as fully featured as Boa, plus or minus a few things. And generally faster too, almost double the speed of Boa on some benchmarks.

Interesting. Hermes and QuickJS both come out looking very good in these (in terms of performance vs. binary size)

Re: Brimstone: ES2025 JavaScript engine written in Rust

#15
Just a small comparison, compiled for release:

Boa: 23M Brimstone: 6.3M

I don't know if closing the gap on features with Boa and hardening for production use will also bloat the compilation size. Regardless, for passing 97% of the spec at this size is pretty impressive.

Re: Brimstone: ES2025 JavaScript engine written in Rust

#16

Memory safety is one of Rust’s biggest selling points. It’s a bit baffling that this engine would choose to implement unsafe garbage collection.

Rust also has some nice language features. Even unsafe rust doesn't have the huge "undefined behaviour" surface that languages like C++ still contain.

If I were to write a toy JS runtime in Rust, I'd try to make it as safe as possible and deal with unsafe only when optimization starts to become necessary, but it's not like that's the only way to use Rust.

Re: Brimstone: ES2025 JavaScript engine written in Rust

#17

Memory safety is one of Rust’s biggest selling points. It’s a bit baffling that this engine would choose to implement unsafe garbage collection.

The obvious use-case for unsafe is to implement alternative memory regimes that don’t exist in rust already, so you can write safe abstractions over them. Rust doesn’t have the kind of high performance garbage collection you’d want for this, so starting with unsafe makes perfect sense to me. Hopefully they keep the unsafe layer small to minimise mistakes, but it seems reasonable to me.

I'm curious if it can be done in Rust entirely though. Maybe some assembly instructions are required e.g. for trapping or setting memory fences.

Re: Brimstone: ES2025 JavaScript engine written in Rust

#19

"Compacting garbage collector, written in very unsafe Rust" got me cracking.

Sorry for the offtop, but I really miss the cracktros. Imagine having Ikari intro before you boot into your OS.

Sorry also for being offtopic, but "cracking" in this case most likely refers to cracking [with laughter].

Re: Brimstone: ES2025 JavaScript engine written in Rust

#20
post #17

Earlier quoted context omitted.

The obvious use-case for unsafe is to implement alternative memory regimes that don’t exist in rust already, so you can write safe abstractions over them. Rust doesn’t have the kind of high performance garbage collection you’d want for this, so starting with unsafe makes perfect sense to me. Hopefully they keep the unsafe layer small to minimise mistakes, but it seems reasonable to me.

I'm curious if it can be done in Rust entirely though. Maybe some assembly instructions are required e.g. for trapping or setting memory fences.

If it comes to it then Rust has excellent support for inline assembly
Post reply on HN