Skip to content

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

@sivagao

Description

@sivagao

翻译自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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions