Git Product home page Git Product logo

nexusjs's Introduction

Nexus.js โ€” Multi-threaded I/O for JavaScript.

Join the chat at https://gitter.im/voodooattack/nexusjs

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 at nexusjs.com.

Building

Please check out the documentation for a guide on how to build Nexus.js.

Documentation

The early documentation is available at nexusjs.com. It will change frequently as new features are added, so keep an eye out!

Also, you can look into the tests directory and the examples directory for an insight into how to use it.

Native add-ons

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 this here.

Contributing

All pull requests, suggestions, and questions are welcome.

Read more

You can read more on Nexus.js and the progress of development in the following articles:

New Series:

FAQ

  • Will you implement require()?

Not likely. Nexus.js will use the Promise-based import(...) API for dynamic loading, and otherwise use the import and export keywords 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 mutex for every variable?

No, please read the documentation, and see Locking 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.EventEmitter exists in every context, but if you replace it in a library it will not affect the Nexus.EventEmitter available 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.

nexusjs's People

Contributors

gitter-badger avatar pytlesk4 avatar voodooattack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nexusjs's Issues

Release schedule

Hi is there any Release Timeline or something else when does it finished to try on production Projects.

thx for Info

submodule problem

Submodule 'vendor/beast' (https://github.com/boostorg/beast.git) registered for path 'vendor/beast'
Submodule 'vendor/webkit' (https://github.com/WebKit/webkit.git) registered for path 'vendor/webkit'
Cloning into 'vendor/beast'...
fatal: reference is not a tree: 9dc9ca13b9c08c1597d05bcf6c19be357e426041
Cloning into 'vendor/webkit'...
fatal: reference is not a tree: c7e2ef8fc3620c4c90f2b3262c41a34d1812fc85
Unable to checkout '9dc9ca13b9c08c1597d05bcf6c19be357e426041' in submodule path 'vendor/beast'
Unable to checkout 'c7e2ef8fc3620c4c90f2b3262c41a34d1812fc85' in submodule path 'vendor/webkit'

setup help: requesting explicit list of dependencies to install

On Ubuntu 16 it's tricky to figure out which dependencies are needed. Can we put a list together in the docs?

I know of these: libicu-dev

open issue: cmake script can't find curl even though libcurl3 is installed

open issue: apt install boost-all-dev on Ubuntu 16 is installing a too old version of boost (1.58). Are you getting boost 1.62 from source?

CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1677 (message):
Unable to find the requested Boost libraries.
Boost version: 1.58.0
Boost include path: /usr/include
Detected version of Boost is too old. Requested version was 1.62 (or
newer).

Please change the license

I'm no legal expert, but it was explained to me that GPL means that even derivative work that doesn't even change the original code would be contaminated by GPL license and become open source no matter what.

Native add-on ABI

A native-addon ABI and a build system for the package manager should be proposed.

Please use this issue to discuss this aspect of the project.

Ingore the hatred from StackExchange

The hatred for JavaScript that they have is incredible. Keep up the good work and do whatever the fuck you want to do. Write whatever you want, don't let their negative, subtle, asinine remarks get in your way. I was appalled reading the thread and seeing all the hate towards JavaScript. They spend more time complaining about JS than actually doing things constructive in their lives. It's pretty sad.

Support `fetch` for HTTP requests

A lot of libraries out there are geared towards the browser which has globals for interacting with the OS. I think it would be useful to provide some of these globals to make it easy to reuse libraries between the Nexus and the browser.

fetch is a great candidate since a lot of es6 libraries are going to be using it for any requests they do.
Websocket would be another great candidate.

OS X: Build failure, creating a static library

On OS X, I get this:

[email protected] ~/W/G/n/build $ ninja -j 16
[828/1358] Linking CXX static library lib/libjs_bundle.a
FAILED: lib/libjs_bundle.a 
: && /usr/local/Cellar/cmake/3.13.4/bin/cmake -E remove lib/libjs_bundle.a && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar qc lib/libjs_bundle.a   && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib lib/libjs_bundle.a && :
ar: no archive members specified
usage:  ar -d [-TLsv] archive file ...
	ar -m [-TLsv] archive file ...
	ar -m [-abiTLsv] position archive file ...
	ar -p [-TLsv] archive [file ...]
	ar -q [-cTLsv] archive file ...
	ar -r [-cuTLsv] archive file ...
	ar -r [-abciuTLsv] position archive file ...
	ar -t [-TLsv] archive [file ...]
	ar -x [-ouTLsv] archive [file ...]
[843/1358] Building CXX object build/webkit/Source/bmalloc/CMakeFiles/bmalloc.dir/bmalloc/Scavenger.cpp.o
ninja: build stopped: subcommand failed.

Any idea how to fix this?

FileSystem sync operations ?

I'm working on a CommonJS require functionality based on ESM module, example:

import cjs from "module";
const require = cjs(import.meta.dirname);

const mod = require('some-module');
// require.cache
// require.resolve

and while I know JSC exposes readFile I am trying to target NexusJS too (beside browsers) but I cannot find anything like readFileSync or statSync

CommonJS is inevitably based on synchronous load so ... is there any plan to make it possible ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.