- Notifications
You must be signed in to change notification settings - Fork21
Nexus.js - The next-gen JavaScript platform
License
voodooattack/nexusjs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Nexus.js is a multi-threaded JavaScript run-time built on top of JavaScriptCore (Webkit) with a focus on high performance and dynamic scaling above all else.
Nexus.js uses an asynchronous, non-blocking I/O model, and a thread-pool scheduler to make the most of modern hardware concurrency.
Nexus.js is Promise-based and embraces ES6 in full; and as a result, it is not compatible with Node.js APIs.
Visit the homepage atnexusjs.com.
Please check out thedocumentation for a guide on how to build Nexus.js.
The early documentation is available atnexusjs.com. It will change frequently as new features are added, so keep an eye out!
Also, you can look into thetests directory and theexamples directory for an insight into how to use it.
While still a big topic for debate, native add-ons should be very feasible in the future, once a proper ABI is chosen. Please discuss thishere.
All pull requests, suggestions, and questions are welcome.
You can read more on Nexus.js and the progress of development in the following articles:
- Introduction
- Input/Output (I/O API Demonstration)
- Events (Promise-Based Concurrent Events On A Multi-threaded Scale)
- Madness (Performance Comparison)
- The Mantra (Questions and Answers)
- Server (TCP API and Stress/Stability Testing)
- A year's Absence (My apology for disappearing for an entire year)
New Series:
- Will you implement
require()?
Not likely. Nexus.js will use the Promise-based
import(...)API for dynamic loading, and otherwise use theimportandexportkeywords for normal module loading.require()can still be implemented by a third-party in pure JavaScript of course, it just won't come built-in.
- Why are you avoiding
require()? Are you planning on breaking all backward-compatibility with Node.js?
Yes. I know the decision is harsh, but it will be better in the long run.It will make porting libraries harder, but the result will be a pure ES6 ecosystem with ES6 modules at its core.This is necessary because Nexus.js is multi-threaded, and most Node.js libraries use globals in one form or another, which means they'd be broken anyway.While accessing globals concurrently will not corrupt them or crash the program, it will produce unexpected behaviour in any event-loop based code. Since it assumes a single-threaded environment.
- How does concurrent access to variables work? Do you use a
mutexfor every variable?
No, pleaseread the documentation, and seeLocking in WebKit, it explains it better than I ever could.
- Can Nexus.js libraries override globals?
The globals are created on-demand in every context that accesses them, and this makes it impossible to replace them.For example,
Nexus.EventEmitterexists in every context, but if you replace it in a library it will not affect theNexus.EventEmitteravailable in a different library, or in the main context.I do plan on offering certain hooks for transpiling utilities and the such. If you're using Babel to transpile JSX for an isomorphic (universal) application, you need not worry.
About
Nexus.js - The next-gen JavaScript platform
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.