Hi, Genodians!
I want to port Node.js for Genode OS, but I understand that it is not a simple matter.
Maybe someone has already started to do this work and I would connect to this process. If answer is NO, then maybe someone will tell something sensible (for a starting point, I familiarized myself with information described at https://genode.org/documentation/developer-resources/porting_noux_packages).
I would be very grateful for any useful information.
Thanks!
On Saturday, March 9, 2019 4:24:14 PM CET, Max wrote:
Hi, Genodians!
I want to port Node.js for Genode OS, but I understand that it is not a simple matter.
Maybe someone has already started to do this work and I would connect to this process. If answer is NO, then maybe someone will tell something sensible (for a starting point, I familiarized myself with information described at https://genode.org/documentation/developer-resources/porting_noux_packages).
I would be very grateful for any useful information.
Thanks!
Hello Max,
I started porting Nodejs as favor for some friends. My advice is start with the hard part, porting V8.
I do not have any code to share however. When I realized what kind of programming methodology Nodejs encourages I decided to destroy all the porting work.
Cheers, Emery
Hi Max,
On 09.03.19 16:24, Max wrote:
I want to port Node.js for Genode OS, but I understand that it is not a simple matter.
welcome to the mailing list!
Given the popularity of Javascript, a port of Node.js to Genode would be very much appreciated. Thanks for reaching out about how to start.
Maybe someone has already started to do this work and I would connect to this process. If answer is NO, then maybe someone will tell something sensible (for a starting point, I familiarized myself with information described at https://genode.org/documentation/developer-resources/porting_noux_packages).
I would be very grateful for any useful information.
I would not target the Noux runtime for any ported software, except when the software required fork and execve. I don't think that Node.js strictly depends on these mechanisms.
So it is probably the best to target a native POSIX component (which does not require the Noux runtime), similar to our port of the lighttpd web server [1].
[1] https://github.com/genodelabs/genode/tree/master/repos/ports/src/app/lighttp...
My assumption is that our libc is mostly complete enough to run the ported program with almost no modification. However, advanced programs like JIT compilers often stretch the limits of our. Typical troubles are the overzealous use of 'mmap' for accessing files instead of using read/write operations, and exploiting POSIX signals to an extreme (installing custom segfault handlers, manipulating register states).
So while the porting (in the sense of recompiling the code for Genode) goes often quite smoothly, the debugging of unexpected runtime behavior must be anticipated. To avoid frustration on your side during this process, you may consider publicly sharing your topic branch once you hit the first road block. So seasoned developers can lend a helping hand.
Cheers Norman