Comments (8)
PS the event-loop is pub/sub (dispatch.ts/go)
@ry Do you confirm this?
from deno.
@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.
http://tinyclouds.org/jsconf2018.pdf
from deno.
@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.
Yes, a clear picture of the Deno's architecture can lead us newbies to explore the sources conveniently.
from deno.
@qti3e I like this graph and it's so clear, we can add it to README.
from deno.
@qti3e [ts compiler] [Fetch ts] Is it executed in V8?
from deno.
@qti3e thank you. ❤️
from deno.
Related Issues (20)
- `node:worker_threads` and WebAPI `Workers` don't terminate HOT 6
- [feature-request] [jupyter] support entering a value inline, with the web standard function `prompt`
- Reenable "tools::test::channel::tests::test_flush_lots" test which is flaky
- deno publish warns about statically analyzable dynamic imports HOT 3
- make the lsp report `deno doc --lint` errors
- JSR: `deno publish` does not respect `config.jsonc`'s `#/publish/include`/`#/publish/exclude` fields HOT 7
- Calling `createImageBitmap` with a `Blob`, "TypeError: expected typed ArrayBufferView" occurred.
- Deno executable doesn't run... HOT 2
- deno publish not using jsr.json when deno.json exists HOT 1
- Compiled app can't load node native module (*.node)
- Enable Node interop against local modules HOT 3
- Cannot opt out of .gitignore when publishing
- Error when file in exports module graph will not be included in publish HOT 1
- `deno publish --dry-run` does not work on GH actions workflow without permissions
- Allow to create SBOM Reports of a Project
- Ability to publish with a version specified as a CLI flag
- LSP - Caching is broken with a deno.jsonc with comments
- jsr specifier resolves to local package when referencing itself HOT 7
- version constraint violation should be visible in `deno publish --dry-run`
- Feature flags for `denort`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deno.