Skip to content
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

A few questions #2

Closed
austinfrey opened this issue Nov 24, 2016 · 3 comments
Closed

A few questions #2

austinfrey opened this issue Nov 24, 2016 · 3 comments

Comments

@austinfrey
Copy link

Just trying to wrap my head around what this project does. Am I correct in thinking that parts of this project libjs, libaio, libsys etc. is to replace the C++/V8 dependencies from Node.js? Can some of these modules be dropped into Node currently? Meaning could I use your fs library written in JS, in Node right now?

When you use the term exokernel, are you using it interchangeably with unikernel? Would i need to use en emulator or some sort of virtualization to run jskernel?

Sorry for the n00b questions :/

@streamich
Copy link
Owner

streamich commented Dec 2, 2016

Am I correct in thinking that parts of this project libjs, libaio, libsys etc. is to replace the C++/V8 dependencies from Node.js?

Yes, I am planing to rewrite all C/C++ parts, so no C/C++ dependencies, plus, you will be able to run it on any JS runtime. Even in browser (if you emulate UNIX system calls). So, it won't replace just C++/V8/Node.js dependencies, but also libc and libuv.

Can some of these modules be dropped into Node currently? Meaning could I use your fs library written in JS, in Node right now?

Yes, you can use fs module already here it is here it is, note that it dependends on libjs, which is a wrapper around system calls. In turn, libjs (you can find it here) has a single dependency process.syscall function, which your JavaScript environment has to provide. For Node.js, libsys package implements the syscall function, you can simply attach it to process global, like so.

(Actually, there is also an asynchronous syscall function process.asyscall, used for asynchronous file system operations, but that is a separate topic of its own. For a toy project, you can just create a fake one from the synchronous process.syscall.)

See this for fs module status.

When you use the term exokernel, are you using it interchangeably with unikernel?

I use it very vaguely as JS running in kernel space, but it is long way to there yet...

Would i need to use en emulator or some sort of virtualization to run jskernel?

When it is ready, I imagine it would be Linux + JS runtime + jskernel (FULL.js).

Eventually, though JS runtime that emits machine code can be itself written in JS and one of the reasons to run it in kernel space is of course to write some hardware stuff in JS, i.e. parts of Linux kernel.

So, in the very distant future I imagine it will be just JS running on bare metal.

@austinfrey
Copy link
Author

@streamich thanks for the information. Are you still planning on using an interpreter or compiler written in C/C++ or are you planning on writing the engine in Javascript too? Reading through the various README's it looks like that's what your F1 project is supposed to be. So it could look like
linux + F1 runtime + jskernel ?

@streamich
Copy link
Owner

Yes, but F1 is long way to go, first there is still a lot to do to get the first version of jskernel out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants