3 ms·
Zig supports C/C++ cross-compilation out-of-the-box so the integration with JavaScriptCore is at the very least facilitated by Zig.
by hu3 4y ago
Zig supports C/C++ cross-compilation out-of-the-box so the integration with JavaScriptCore is at the very least facilitated by Zig.
- pjmlp 4y agoStill 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.
- hu3 4y agoWhat's the point of your comment? They don't claim it's pure Zig and even mention JavaScriptCore in their front page.
- pjmlp 4y ago> Bun: Fast JavaScript runtime, transpiler, and NPM client written in Zig Definitely reads otherwise and is click bait, given the actual implementation.
- cweagans 4y agoI'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.
- pjmlp 4y agoMy argument is as sound as the English understanding out of the sentence.
- cweagans 4y agoI 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 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.