基于 V8 的 TypeScript 运行时 deno

码农软件 · 软件分类 · 浏览器/JS引擎 · 2019-04-05 07:13:07

软件介绍

deno

deno 是 V8 上的安全 TypeScript 运行时。

  • 支持 TypeScript 2.8 开箱即用,使用 V8 6.8.275.3 引擎

  • 无 package.json、npm,不追求兼容 Node

  • 通过 URL 方式引入依赖而非通过本地模块,并在第一次运行的时候进行加载和缓存,并仅在代码使用--reload运行,依赖才会更新,引入方式如:

    import { test } from "https://unpkg.com/deno_testing@0.0.5/testing.ts"
    import { log } from "./util.ts"
  • 可以控制文件系统和网络访问权限以运行沙盒代码,默认访问只读文件系统可访问,无网络权限。V8 和 Golang 之间的访问只能通过 protobuf 中定义的序列化消息完成;

  • 最终创建单一可执行文件

     > ls -lh deno
     -rwxrwxr-x 1 ryan ryan 55M May 28 23:46 deno
     > ldd deno
     	linux-vdso.so.1 =>  (0x00007ffc6797a000)
     	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f104fa47000)
     	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f104f6c5000)
     	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f104f3bc000)
     	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f104f1a6000)
     	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f104eddc000)
     	/lib64/ld-linux-x86-64.so.2 (0x00007f104fc64000)

  • 发生未捕捉错误时自动终止运行

  • 支持 top-level 的 await

  • 旨在兼容浏览器

  • 可以作为库来引入,以轻松构建自己的 JavaScript runtime
    https://github.com/ry/deno/blob/master/cmd/main.go

本文地址:https://codercto.com/soft/d/2888.html

Programming Amazon Web Services

Programming Amazon Web Services

James Murty / O'Reilly Media / 2008-3-25 / USD 49.99

Building on the success of its storefront and fulfillment services, Amazon now allows businesses to "rent" computing power, data storage and bandwidth on its vast network platform. This book demonstra......一起来看看 《Programming Amazon Web Services》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具