Git Product home page Git Product logo

Comments (8)

qti3e avatar qti3e commented on April 28, 2024 35

image
PS the event-loop is pub/sub (dispatch.ts/go)
@ry Do you confirm this?

from deno.

qti3e avatar qti3e commented on April 28, 2024 10

@hufeng we have this Eval() function defined in main.go to evaluate a JS (not TS) string inside our V8 contex:
https://github.com/ry/deno/blob/b723ab126f5cc37b27d914e6cbdba9a4f9ce1c71/main.go#L100-L105

We use a similar way in Init() to load our main JS file:
https://github.com/ry/deno/blob/b723ab126f5cc37b27d914e6cbdba9a4f9ce1c71/main.go#L94-L97

As you see this uses a function called stringAsset(), you can check out go-bindata for more information... but for now we just need to know it loads a file, which is main.js.

main.js is a pre-compiled ts file in dist dir, look at this Makefile entity:
https://github.com/ry/deno/blob/b723ab126f5cc37b27d914e6cbdba9a4f9ce1c71/Makefile#L55-L57

Finally, we executed Deno's core js file inside V8, and that's the beginning of all magic : )

FYI; You can find codes related to ts compiler inside runtime.ts.

from deno.

ry avatar ry commented on April 28, 2024 4

http://tinyclouds.org/jsconf2018.pdf

from deno.

qti3e avatar qti3e commented on April 28, 2024 3

@monkingxue Thanks for the suggestion : )
But it's my point of view, and Ryan might want to present this project in some other ways...
let's wait till he says something...

from deno.

rustkt avatar rustkt commented on April 28, 2024

Yes, a clear picture of the Deno's architecture can lead us newbies to explore the sources conveniently.

from deno.

monkingxue avatar monkingxue commented on April 28, 2024

@qti3e I like this graph and it's so clear, we can add it to README.

from deno.

hufeng avatar hufeng commented on April 28, 2024

@qti3e [ts compiler] [Fetch ts] Is it executed in V8?

from deno.

hufeng avatar hufeng commented on April 28, 2024

@qti3e thank you. ❤️

from deno.

Related Issues (20)

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.