Readit News logoReadit News
nekevss commented on Date is out, Temporal is in   piccalil.li/blog/date-is-... · Posted by u/alexanderameye
jrpelkonen · a month ago
Somewhat related: Jiff (https://github.com/BurntSushi/jiff) is a Rust library inspired by the Temporal api.
nekevss · a month ago
The library used for V8's temporal implementation is in Rust too ;)
nekevss commented on Date is out, Temporal is in   piccalil.li/blog/date-is-... · Posted by u/alexanderameye
promiseofbeans · a month ago
We’ve been loving using it in our Deno servers since last year. It’s been frustrating that we haven’t been able to upgrade our web client date logic yet, since even though Firefox has supported Temporal for a while, Chrome have really dragged their feet
nekevss · a month ago
I don't know if that's totally fair to Chrome. The specification was undergoing a lot of changes at the time, and V8 decided to wait for the specification to stabilize; meanwhile, Anba kept working on the implementation for FireFox. Additionally, the version of Temporal that Deno exposed last year was the heavily out of date to the most recent specification and had a large portion of the specification that was not even implemented.
nekevss commented on Brimstone: ES2025 JavaScript engine written in Rust   github.com/Hans-Halverson... · Posted by u/ivankra
nicoburns · 3 months ago
Is it possible to build Boa without these APIs?
nekevss · 3 months ago
For the engine, the answer is yes, Intl and Temporal are feature flagged due to the dependencies. What I suspect they’re comparing above is the CLIs, which is completely different than the engine. I’d have to double check for the CLI. If I recall correctly, we include all features in the CLI by default.
nekevss commented on Brimstone: ES2025 JavaScript engine written in Rust   github.com/Hans-Halverson... · Posted by u/ivankra
HansHalverson · 3 months ago
Brimstone does embed Unicode tables, but a smaller set than Boa embeds: https://github.com/Hans-Halverson/brimstone/tree/master/icu.

Brimstone does try to use the minimal set of Unicode data needed for the language itself. But I imagine much of the difference with Boa is because of Boa's support for the ECMA-402 Internationalization API (https://tc39.es/ecma402/).

nekevss · 3 months ago
Yeah, the majority of the difference is from the Unicode data for Intl along with probably the timezone data for Temporal.
nekevss commented on Boa: A standard-conforming embeddable JavaScript engine written in Rust   github.com/boa-dev/boa... · Posted by u/maxloh
ivankra · 3 months ago
> Not seeing V8, SpiderMonkey JavaScriptCore is very strange...

They do compare with JIT-less V8 and SpiderMonkey there, just JSC is missing.

I recently did my own benchmarking with a lot more engines, including other Rust engines: https://ivankra.github.io/javascript-zoo/?v8=true

Personally, I'm more impressed with https://github.com/Hans-Halverson/brimstone - it is faster, nearly just as full featured (almost full ES2025) and last but not least, a single person project.

nekevss · 3 months ago
Yeah! I found out about Brimstone just the other day! Its definitely interesting! One optimization that they have that Boa needs to implement is ropes for our string type :)
nekevss commented on Boa: A standard-conforming embeddable JavaScript engine written in Rust   github.com/boa-dev/boa... · Posted by u/maxloh
giancarlostoro · 3 months ago
> plenty of Rust projects have found good use for it as they find it easy to embed and use, so we’re happy.

I could easily see something similar to MongoDB being birthed out of Boa. MongoDB uses v8 for querying.

nekevss · 3 months ago
Huh! TIL. I'll have to look into that, I'm curious how it works. Although, now that I think about it, that does make sense.
nekevss commented on Boa: A standard-conforming embeddable JavaScript engine written in Rust   github.com/boa-dev/boa... · Posted by u/maxloh
hombre_fatal · 3 months ago
How endearing is it seeing multiple maintainers hop in the comments to happily answer questions?

Seems like a nice team and project.

nekevss · 3 months ago
Thanks! It's always nice to talk and answer questions about the project!
nekevss commented on Boa: A standard-conforming embeddable JavaScript engine written in Rust   github.com/boa-dev/boa... · Posted by u/maxloh
amelius · 3 months ago
Here are some gc crates:

https://docs.rs/rsgc/latest/rsgc/

https://docs.rs/ristretto_gc/latest/ristretto_gc/

https://docs.rs/dumpster/latest/dumpster/

https://docs.rs/shredder/latest/shredder/

I have no experience with them. In any case, it would be advisable to make the GC implementation swappable so that the language is gc-implementation-agnostic.

nekevss · 3 months ago
The hope of the experiments is to hopefully find an API that can be used and allow for the GCs to be more swappable. At least that's my personal hope.

We really have to dig into the experimentation and rewrite before knowing for certain.

nekevss commented on Boa: A standard-conforming embeddable JavaScript engine written in Rust   github.com/boa-dev/boa... · Posted by u/maxloh
Sytten · 3 months ago
Hi! I am one of the maintainer of rquickjs and llrt. Are you looking to build node-like modules anytime soon? I think we could easily port most of the modules I wrote for llrt to your engine. If we could get rid of the C code in our app, that would make me very happy.
nekevss · 3 months ago
Hi!

I'm not aware of any plans to build node-like modules, but I think we have the basic support to potentially build them out ... but I could be overlooking or missing something. I'm not personally familiar with them. But defining and using a macro should hopefully be fairly straightforward in Rust with the macros from our latest release (https://boajs.dev/blog/2025/10/22/boa-release-21#boa_module). If we're missing something, feel free to let us know.

Any runtime functionality that has been implemented is available in `boa_runtime`. I've mentioned this elsewhere in the thread, but this crate is not a runtime itself (yet). Currently, it's a collection of runtime features like `console` and `fetch`.

nekevss commented on Boa: A standard-conforming embeddable JavaScript engine written in Rust   github.com/boa-dev/boa... · Posted by u/maxloh
amelius · 3 months ago
Are existing GCs for Rust (e.g. rsgc) not suitable?
nekevss · 3 months ago
Right now, we use a forked and modified version of the `gc`. We definitely need to update it. Admittedly, I've been hoping to work on it but got a little distracted with temporal ...

I don't think I've actually heard of rsgc before. It's definitely interesting to see playXE put it together. I know that they'd been working on starlight at one point, so it'd be interesting to see takeaways from it.

To get to your question on the existing GCs, so far the answer is we don't truly know. We really need to do some GC experiments and test different options in Boa with JavaScript. There are not really that many GC crates out there of which I'm aware. There rust-gc's `gc` crate, dumpster, and `arena-gc` (tack on rsgc). But of those, the `gc` crate truly has the best API that we've used in Boa, but the performance is not ideal amongst other optimizations. It would be nice to preserve that API while improving the performance as well. But that remains to be seen.

u/nekevss

KarmaCake day57November 23, 2022View Original