Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Bun.js uses the JavaScriptCore engine, which tends to start and perform a little faster than more traditional choices like V8

So it isn't really everything written in Zig and there is some C++ helping there, actually.



Did you consider Deno as misleading?

The fact it states it's powered by JSC before even mentioning Zig makes it pretty clear, imo.


Depends on how it sells the rewrite.


Zig supports C/C++ cross-compilation out-of-the-box so the integration with JavaScriptCore is at the very least facilitated by Zig.


Still isn't Zig.

Using the same reasoning I can assert having written a JavaScript runtime in e.g. F# by making use of C++/CLI to compile JSC.


What's the point of your comment?

They don't claim it's pure Zig and even mention JavaScriptCore in their front page.


> Bun: Fast JavaScript runtime, transpiler, and NPM client written in Zig

Definitely reads otherwise and is click bait, given the actual implementation.


I'm not really sure what your argument is. It sounds like you're complaining that he used a library to handle the actual javascript parsing/evaluation. There are still platform-specific things that need to be implemented and plugged in to the JS environment to be able to do anything useful (for instance, starting up a server and binding to a port isn't something that the OOTB JavaScriptCore sandbox is going to let you do - you have to implement that separately and plug it in yourself). The transpiler and npm client are completely separate things.

If you read "runtime" as "extensions that allow you to do actually useful stuff" instead of "parser/evaluator", I don't see an issue.


My argument is as sound as the English understanding out of the sentence.


I just pointed out that there is a different interpretation of the sentence that makes it work. It's a little arrogant to assume that not only is your interpretation the "correct" one, but that it's the _only_ one.

There is precedent for this too -- for instance, the ".NET runtime" is not only the JIT/AOT compiler for CIL, but also the libraries providing the .net api + standards/mechanisms for loading other libraries, etc.

See also https://stackoverflow.com/questions/3900549/what-is-runtime :

> Runtime describes software/instructions that are executed while your program is running, especially those instructions that you did not write explicitly, but are necessary for the proper execution of your code. [...] Runtime code is specifically the code required to implement the features of the language itself.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: