Get started with DenoWhat is Deno ## “Deno 是基于 V8 并采用 Rust 构建的, 一个简单、现代且安全的 JavaScript 和 TypeScript 运行时环境。” Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. https://deno land/ ## Deno / 基于 V8 V8 是一个由 Google 开发的开源 JavaScript 引擎,其在运行之前将 JavaScript 编译成了机器代码,而非字节码或是解释执行它,以此提升性能。更进一步,使用了如 Inline Cache 等方法来提高性能。有了这些功能,JavaScript 程序与 V8 引擎的速度媲美二进制编译。在 Deno 中,V8 引擎用于执行 JavaScript Rust 构建 Rust 是由 Mozilla 主导开发的通用、编译型编程语言。设计准则为 “安全、并发、实用”,支持函数式、并发式、过程式以及面向对象的编程风格。Deno 使用 Rust 语言来封装 V8 引擎,通过 libdeno 绑定,我们就可以在 JavaScript 中调用隔离的功能。 ## Deno / 简单 1. 天生支持 TypeScript - 使用 Deno 运行 TypeScript0 码力 | 43 页 | 1.51 MB | 2 年前3
Node.js - the coredisambiguate it from other nodes.” https://github.com/joyent/node/wiki/FAQ • Runs on top of Chrome V8 (see next slide) • Implemented in C++ and JavaScript • Supported on Linux, Mac OS X and Windows application can benefit from asynchronous, non-blocking I/O application is not compute-intensive V8 engine is fast enough • prefer callback or actor models of concurrency • over thread-based approach Chrome V8 • From Google • Used by Chrome browser and Node.js • Implemented in C++ Currently supports ECMAScript 5 Node adopts the JavaScript syntax supported by V8 so will support ES6 when V8 supports0 码力 | 124 页 | 7.87 MB | 2 年前3
15 Envoy Istio WebAssembly 扩展实现原理 边鹏远## Envoy/Istio WebAssembly 扩展实现原理 ... 边鹏远 (github: bianpengyuan) ## 目录 Wasm 和 V8 engine 简介 Wasm 扩展对于Envoy的意义 Wasm 扩展在 Envoy 的实现原理 Wasm 扩展在 Istio 的应用 未来工作 ## WebAssembly “WebAssembly (abbreviated 1) 当 Envoy 主线程加载带有 Wasm 扩展的 listener 时,开始创建一个 V8 Isolate,并且将 Envoy 对于 Wasm ABI 实现注入到创建的 Context 2) V8 加载,解析,编译 Wasm module 3) Envoy Wasm runtime 从 V8 Isolate 中读取扩展实现 至此,主线程完成创建 Base Wasm 实例(模板 Wasm 1.jpg) ## 性能开销 ## ☐ 内存 ☐ Wasm module 代码: 占用 xxx Kb 到 x Mb 不等 ☐ Wasm 运行时的线性内存 ☐ V8 自身运行内存:~10 Mb ## ☐ CPU ☐ V8 背景线程 ☐ C++ 到 Wasm 之间的切换 Envoy::Http::HeaderMapImpl::StaticLookupTable0 码力 | - 页 | 916.89 KB | 1 年前3
The Node.js Handbook
JavaScript do you need to know to use Node? • 5. Differences between Node and the Browser • 6. The V8 JavaScript Engine 6.1. Other JS engines 6.2. The quest for performance 6.3. Compilation • 7. Run JavaScript runtime environment. It is a popular tool for almost any kind of project! Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser. This allows Node.js to be very find ways to make JavaScript run faster. The engine that Node.js uses under the hood, V8 (also known as Chrome V8 for being the open-source JavaScript engine of The Chromium Project), improved significantly0 码力 | 161 页 | 1.66 MB | 2 年前3
Release Notes for Node.js 18COMPONENT VERSIONS ..... 4 CHAPTER 2. FEATURES ..... 5 2.1. NEW AND CHANGED FEATURES ..... 5 2.1.1. V8 JavaScript engine upgraded to v10.2 ..... 5 2.1.2. Default values for HTTP timeouts ..... 5 2.1 documentation. ###### 2.1.1. V8 JavaScript engine upgraded to v10.2 This release includes an upgrade of the V8 JavaScript engine to v10.2, which is part of Chromium 101. The upgraded V8 JavaScript engine includes ordinary property stores For more information about the changes that are available in the V8 JavaScript Engine, see the V8 blog. ##### 2.1.2. Default values for HTTP timeouts This release includes the following0 码力 | 18 页 | 106.27 KB | 2 年前3
Node 的设计错误的许多异步 API 因此而严重老化 ## 遗憾:安全性 • V8 本身是一个非常好的安全沙箱。 - 如果我对如何维护某些应用程序进行更多的思考,Node 可能会拥有一些其他任何语言都无法获得的安全保证。 - 示例:您的 linter 不应该完全访问您的计算机和网络。 ## 遗憾:构建系统(GYP) • 构建系统非常困难且非常重要。 • V8(通过Chrome)开始使用GYP,并且我切换了 Node - GYP 不是一个丑陋的内部界面,它暴露给任何试图绑定到 V8 的人。 - 这对用户来说是一个可怕的经历。这是一种披着 Python 外衣的假 JSON。 ## 遗憾:构建系统(GYP) - GYP 的持续使用可能是 Node 核心最大的故障。 - 我应该提供一个核心的外部功能接口(FFI),而不是指导用户编写 C++ 来绑定到 V8 - 许多人很早就建议搬到FFI(也就是 Cantrill),遗憾的是我忽视了他们的建议。 com/ry/deno V8上一个安全的 TypeScript 运行时 ## Deno 目标:安全 - 利用 JavaScript 是一个安全沙箱的事实。 默认情况下,脚本应该在没有任何网络或文件系统写访问的情况下运行。 用户可以选择通过标志访问:--allow-net --allow-write 这允许用户运行不可信的实用程序(例如就像一个 linter) - 不允许任意本地函数绑定到V8中 所有0 码力 | 28 页 | 767.84 KB | 2 年前3
Introducing NativeScriptJavaScriptCore on iOS • V8 on Android • JavaScriptCore on Windows var time = new android.text.format.Time(); time.set(1, 0, 2015); console.log(time.format("%D")); • Runs on V8 var alert = new UIAlertView(); at build time. ## I njecting native APIs • V8/JavaScript Core have APIs to inject global variables ## v8 namespace Reference Debugger support for the V8 JavaScript engine. More... Namespaces namespace (in backward direction).|| ## I nvoking native APIs var time = new android.text.format.Time(); - V8/JavaScriptCore have C++ callbacks for JS function calls and property accesses. - The NativeScript0 码力 | 47 页 | 3.36 MB | 2 年前3
The Zig Programming Language 0.4.0 Documentationrenderscript64, pub const Arm32 = enum { v8_5a, v8_4a, v8_3a, v8_2a, v8_1a, v8, v8r, v8m_baseline, v8m_mainline, v7, v7em, v7m, v7s, v7k, v7ve v5te, v4t, }; pub const Arm64 = enum { v8_5a, v8_4a, v8_3a, v8_2a, v8_1a, v8, v8r, v8m_baseline, v8m_mainline, }; pub const Kalimba = enum { v5, v4, v3 Architectures: arm v8_4a v8_3a v8_2a v8_1a v8 v8r v8m_baseline v8m_mainline v7 v7em v7m v7s v7k v7ve v6 v6m v6k v6t2 v5 v5te v4t armeb v8_4a v8_3a v8_2a v8_1a v8 v8r v8m_baseline v8m_mainline v7 v7em0 码力 | 207 页 | 5.29 MB | 2 年前3
Node.js Manual & Documentation目前比较繁杂,主要包括下述几个主要类库: - V8 JavaScript, a C++ library. Used for interfacing with JavaScript: creating objects, calling functions, etc. Documented mostly in the v8.h header file (deps/v8/include/v8.h in the the Node source tree). V8 JavaScript,C++类库,作为 JavaScript 的接口类,主要用于创建对象、调用方法等功能。大部分功能在头文件 v8.h (在 node 文件夹下的路径为 deps/v8/include/v8.h)中有详细文档。 - libev, C event loop library. Anytime one needs to wait for a To get started we create a file hello.cc: 首先我们需要创建一个 hello.cc 文件: #includeusing namespace v8; extern "C" void init (Handle 0 码力 | 153 页 | 1.21 MB | 2 年前3
Node.js在YunOS中的最佳实践 e)  与V8强绑定,解耦或升级很困难(native调用强依赖V8接口)  code Run JS code ## 性能优化的实践(二) ## Code cache: 充分利用V8引擎的能力,预先将JavaScript代码编译好生成cache文件 运行时加载cache文件,跳过编译过程,直接运行预编译的代码,提高运行效率 Compile time: a.js V8 a.js.cache ScriptCompiler::Source::GetCachedData()0 码力 | 20 页 | 1.37 MB | 2 年前3
共 98 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
相关搜索词
DenoV8RustTypeScript安全性Node.jscore modulesJavaScriptrequireWebAssemblyEnvoyIstioV8 engineApplication Binary InterfacenpmV8引擎事件循环Node.js 18 LTSV8 JavaScript engineHTTP timeoutsBlob APIBroadcastChannel APIGYPPromiseNode_modulesrequire函数NativeScript单一代码库原生应用跨平台内存分配错误处理指针数组文档模块require()定时器全局对象YunOS性能优化IO事件驱动多任务处理













