Skip to content

中文翻译:<denoland/deno> 在 V8 上 构建一个安全 TypeScript 运行引擎 ❤️ 更新 中

Notifications You must be signed in to change notification settings

chinanf-boy/deno-zh

Repository files navigation

denoland/deno explain translate-svg

「 在 V8 上 构建一个安全 TypeScript 运行引擎 」

中文 | english


校对 ✅

翻译的原文 与日期 最新更新 更多
commit ⏰ 2018-12-14 last 中文翻译

贡献

欢迎 👏 勘误/校对/更新贡献 😊 具体贡献请看

生活

If help, buy me coffee —— 营养跟不上了,给我来瓶营养快线吧! 💰


deno

Linux&Mac Windows

A secure TypeScript runtime built on V8

在 V8 上 构建一个安全 TypeScript 运行引擎。

  • 支持开箱即用的 TypeScript。使用最新版本的 V8。也就是说,它是非常现代的 JavaScript.

  • 不用package.json。 没有 NPM。与 Node 不显式兼容.

  • 只导入参考源代码 URL.

    import {test} from 'https://unpkg.com/deno_testing@0.0.5/testing.ts';
    import {log} from './util.ts';

    在第一次执行时,获取并缓存远程代码,除非使用--reload参数。(所以,这在飞机上仍然有效。)见~/.deno/src中有关缓存的详细信息。)

  • 可以控制文件系统和网络访问,以便运行沙箱代码。默认为只读文件系统访问,且没有网络访问。V8(非特权)和 Rust(特权)之间的访问,仅通过以下定义的flatbuffer序列化消息完成。 这使得审计变得容易。要显式启用写访问,请使用--allow-write和,--allow-net用于网络访问.

  • 单个可执行文件:

    > ls -lh target/release/deno
    -rwxr-xr-x  1 rld  staff    48M Aug  2 13:24 target/release/deno
    > otool -L target/release/deno
    target/release/deno:
      /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
      /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)
      /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 58286.51.6)
      /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)
    >
    
  • 总是死于,未发现的错误。

  • 目的之一是支持 顶层 await.

  • 目标是与浏览器兼容。

Install

使用 Python:

curl -L https://deno.land/x/install/install.py | python

用 PowerShell:

iex (iwr https://deno.land/x/install/install.ps1)

注意:根据您的安全设置,您可能必须先运行Set-ExecutionPolicy RemoteSigned -Scope CurrentUser,才能允许下载的脚本执行.

试试看:

> deno https://deno.land/thumb.ts

也可看看deno_install.

Status

正在开发中.

我们发布二进制版本,here.

文档是这里.

About

中文翻译:<denoland/deno> 在 V8 上 构建一个安全 TypeScript 运行引擎 ❤️ 更新 中

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages