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

Couldn't you replace v8 with this and recompile the node binary? If it passes 100% ECMAScript tests, that should mean it's a drop-in replacement for v8. Correct me if I'm wrong.


fs/net and some other important pieces of Node.js are written as C++ addons for v8, hooking them would be very difficult I guess. Though Microsoft have been working on this for their ChakraCore engine. There was a conflict if I recall correctly, Microsoft suggested to add another abstraction layer to make hooking other JS engines easier but Node.js team refused it. I might not know that situation very well. But I have downloaded ChakraCore based Node.js once and it ran my project without problems, though the performance was about 5% slower.


How could we easily expose syscalls to `qjs`? Deno is just a Rust IPC/syscall layer glued to V8 really...


Some Node APIs could probably be implemented using the std and os modules[1], but others (e.g. networking) would probably need to be implemented via the C API[2].

[1]: https://bellard.org/quickjs/quickjs.html#Standard-library

[2]: https://bellard.org/quickjs/quickjs.html#QuickJS-C-API


Perhaps libuv-webserver[1] could be used for that purpose?

[1]: https://github.com/springmeyer/libuv-webserver


It'd be super neat if he added a native `net` module. Then we could do node.js http/net vs QuickJS benchmarks.




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

Search: