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

2016/05/04 Node.js 是怎么工作? #39

Open
sivagao opened this issue Apr 29, 2016 · 0 comments
Open

2016/05/04 Node.js 是怎么工作? #39

sivagao opened this issue Apr 29, 2016 · 0 comments

Comments

@sivagao
Copy link
Owner

sivagao commented Apr 29, 2016

翻译自How does NodeJS work?

Browser

Virtual Machine

V8

V8 Templates

Function Template

Object Template

By now, we learned how to expose C++ methods\structures to JavaScript. We will now learn how to run JavaScript code in those modified contexts. It’s simple. Just compile and run principle.

V8 Compile && Run JavaScript

C++ -> V8 Templates -> Run JavaScript -> ?

Modularity

C++ Module Loader

JavaScript Module Loader

Let’s start with NativeModule first.

Another thing is Module loader implementation.

NodeJS Runtime Library?

Event Loop

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

1 participant