重构完之后,Deno 的各种语言比例大概是:
可以看到,使用最多的语言依然是 TypeScript,占比有一半以上。其次是 Rust,占到了差不多三分之一,其次才是 JavaScript。
此次更新带来的收益为:
原始 PR 信息 (Port internal TS code to JS #6793) :
![d09d9b0dbc8f60bf430d25748da55b03.png](https://img-blog.csdnimg.cn/img_convert/d09d9b0dbc8f60bf430d25748da55b03.png)
- 增量编译:从 2 分钟降低到了 30 秒。
- 编译后的二进制大小:减小了 1Mb。
- 代码大小:代码行数减少了 2700 行。
Deno 为什么把核心模块从 ts 改回了 js
Deno 中文手册诞生记:18 位志愿者,5 天时间翻译完成了所有 Deno 核心 API
使用 VS Code 开发 Deno
原始 PR 信息 (Port internal TS code to JS #6793) :
This PR converts our internal runtime code to use pure JS instead of TS. It enables future refactors:
reducing the size of the compiler snapshot.
removing deno_typescript crate completely
op crates
This work has been planned extensively beforehand: See the design doc.
Incremental compile: from 2 min down to 30 seconds
touch cli/js/web/fetch.ts; cargo build
master 2m 06s
master 1m 55s
#6756 54s
#6756 51s
this branch 33s
this branch 31s
Release binary size: 1mb smaller
Due to removing source maps for internal code. (Measured on mac.)
master 48122324
this branch 47326308
Code size: ~2700 fewer lines of code
In particular, removes our compile-time TypeScript compiler. This reduces the number of custom TypeScript compilers from 2 to 1.
214 files changed, 16804 insertions(+), 19549 deletions(-)