-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makefile-Parser for NodeOs #85
Comments
I'm currently busy with my job and classes and can't create a list of entry tasks for newcomers directly related to NodeOS, but you can work on some somewhat external, auxiliar packages. From the top of my head, an easy and interesting external project is to create an implementation of GNU make, for example implemented in a package with a parser of rules and targets Makefile format and another core one to process that data and exec the commands. Another more advanced project would be to help to exec pypyjs as a cli command. Both of these tasks will help to make it easier to have compiled modules support installation on NodeOS by needing lesser build-time dependies (with those packages both |
Thank you! Will be active on Repo , will get into core contribution once i understand the project enough :) |
You are welcome ;-) |
@piranna : i would want to take up the external project on implementation of GNU make , i want little guidance on how to go about it and i can then code it . What would be a better place to take forward this conversation , Continue with this thread of conversation or on IRC ? |
We can continue talking here or in a new, specific topic. I'm not too much about IRC, one of the good things of GitHub issues is that I can answer them with my email client on my smartphone :-P Ok, I would make two new project, one for the parser of the Makefile format (makefile-parser, maybe?) and another for the runtime (make.js?). The parser generate a JSON-like object with the targets, their dependent resources and the script tasks to execute and "generate" that target, and also allow to define some environment variables. You can look at the GYP format for inspiration since in the end it generates a Makefile, or you can do it more similar to the Makefile format and nomenclatures to make it easier to understand for contributors since you can reference to the GNU make manual. The runtime would accept that object and process it. A target is check by the modification timestamp, if any of their dependent resources is newer or the target don't exists then the target needs to be regenerated, and obviously this works recursively :-D This is the basic functionality, later it would come the virtual (".phony") targets and the parallel execution, but the basic one is simple enought by the moment :-) |
The parser is written on NodeJs right ??? I dont know whether the question is silly , im yet to properly understand the architecture of NodeOS |
Yes, both the parser and the runtime both written in Node.js :-) The architecture of NodeOS is easy: a Linux kernel, a Node.js binary, and (ideally) all the other libraries and binaries in Node.js Javascript files managed by NPM. make can be one of them, and a Python vm compiled to Javascript too. C compiler for the native modules seems more tricky due it needs to generate native code, so since we need to compile libgcc and libstd++ we'll use by the moment a compiled gcc binary, but theoretically it would be a Javascript executable too, take a look at llvm.js that's a compilation of llvm using emscripten :-) |
Just saw llvm.js , indeed an amazing idea which allows C and C++ code to be compiled into optimizable JS ! The architecture makes sense too , you obviously need a kernel to translate system calls to the underlying machine , and NodeJS executable compiled using g++ and NPM to manage to deal with Node modules . But is Makefiles in NodeOS again used for the purpose for which it is original used ?? That is for purpose of building executables from the source or is it used as NPM here in NodeOS ? |
llvm.js, if used, should compile to machine code, not to Javascript, but previously to change to it we should focus on have NodeOS stable. I would like to use llvm everywhere and make NodeOS self-hosted, so let's wait until Linux kernel compile with it ;-) The reason of needing a C compiler on NodeOS is to be able to install compiled modules with NPM, like ws due to performance issues, or node-posix to access to the low level Linux syscalls. That's why we need a |
progress on this?
I've actually started working on this but I've left is a secret :P |
I'm interested in contributing , would like to know where to help .
The text was updated successfully, but these errors were encountered: