Live data from Hacker News

How we built JSR

deno.com

1–10 of 41 posts

Re: How we built JSR

#3
post #2

Interesting that they use Rust for most things, rather than Deno. I would've expected more dog-fooding on their part.

The Javascript and Python ecosystems, somewhat ironically, have begun using rust for their tooling, because the actual language is too slow.

Aside though: IMO python is good as "glue" between low level code. JS... I don't know man.

Re: How we built JSR

#6
post #2

Interesting that they use Rust for most things, rather than Deno. I would've expected more dog-fooding on their part.

Not really. Most software nowadays is like When I pay it is Rust for best performance when user pays(in perf or actual dollars) ..blah..blah.. JS/Electron for the win

Re: How we built JSR

#7
post #2

Interesting that they use Rust for most things, rather than Deno. I would've expected more dog-fooding on their part.

Deno is written in Rust, so it makes sense to write stuff like Typescript compilation in the same ecosystem as your Typescript runtime.

It sounds like they use Fresh (deno framework) for the web ui parts.

JavaScript for UI, Rust for data

Re: How we built JSR

#8
post #2

Interesting that they use Rust for most things, rather than Deno. I would've expected more dog-fooding on their part.

So the reason we do this - and I should have mentioned this in the post - is that we explicitly do not want to dog food here. Because JSR is the package registry, if it goes down, and we can not pull packages from the registry during deployment of a new version of the registry (that fixes the reason it is down), that would be very bad. So we don't put anything that depends on the registry in the path of deployment of the registry :)

Also, a lot of the work that the registry does (parsing source code, analyzing dependencies, enforcing rules on the code, etc) are pieces of code that are shared with the Deno CLI, which implements this in Rust. The reason for this is that this work has to happen in Rust, because JavaScript, for the most part, can not "self-host" itself (ie you can not implement a JavaScript runtime on a JavaScript host if you want your runtime to provide more system bindings than the host runtime).

Finally, we do use Deno for many pieces of the registry where the "circular dependency" problem is not relevant. Namely the entire frontend uses Deno and Fresh :)

Post reply on HN