All Projects → andreburgaud → docker-v8

andreburgaud / docker-v8

Licence: MIT license
Docker V8 Image

Programming Languages

Dockerfile
14818 projects
shell
77523 projects
Makefile
30231 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to docker-v8

V8js
V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
Stars: ✭ 1,659 (+6280.77%)
Mutual labels:  v8
V8
✔️8️⃣ 分析V8和周边技术、并且着手代码的优化
Stars: ✭ 179 (+588.46%)
Mutual labels:  v8
bytenode
A minimalist bytecode compiler for Node.js
Stars: ✭ 2,042 (+7753.85%)
Mutual labels:  v8
Llvm Node
Node LLVM 4.0+ Bindings
Stars: ✭ 127 (+388.46%)
Mutual labels:  v8
V8 Natives
Access v8 Engine Natives easily in Chrome & Node
Stars: ✭ 161 (+519.23%)
Mutual labels:  v8
Unreal.js Core
Unreal.js plugin submodule
Stars: ✭ 189 (+626.92%)
Mutual labels:  v8
Flamebearer
Blazing fast flame graph tool for V8 and Node 🔥
Stars: ✭ 1,485 (+5611.54%)
Mutual labels:  v8
FENews.org
fenews.org
Stars: ✭ 20 (-23.08%)
Mutual labels:  v8
Discovery
Discoveries on Sustainable Loading research
Stars: ✭ 174 (+569.23%)
Mutual labels:  v8
Electron
Build cross-platform desktop apps with JavaScript, HTML, and CSS
Stars: ✭ 99,383 (+382142.31%)
Mutual labels:  v8
V8dotnet
A fairly non-abstracted wrapper for Google's V8 JavaScript engine.
Stars: ✭ 133 (+411.54%)
Mutual labels:  v8
Core
Server core components which are a part of ONLYOFFICE Document Server
Stars: ✭ 152 (+484.62%)
Mutual labels:  v8
Php V8
PHP extension for V8 JavaScript engine
Stars: ✭ 197 (+657.69%)
Mutual labels:  v8
Learn Javascript
《前端基础漫游指南》深入的、系统的学习 javascript 基础,喜欢点 Star
Stars: ✭ 128 (+392.31%)
Mutual labels:  v8
WebView4Delphi
WebView4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows.
Stars: ✭ 157 (+503.85%)
Mutual labels:  v8
Bacardi
Bacardi project is an effort to provide multi-language binding for Node.js native layer.
Stars: ✭ 115 (+342.31%)
Mutual labels:  v8
Easy Monitor
企业级 Node.js 应用性能监控与线上故障定位解决方案
Stars: ✭ 2,451 (+9326.92%)
Mutual labels:  v8
all-about-node
All about Node.js
Stars: ✭ 16 (-38.46%)
Mutual labels:  v8
zig-v8
Simple V8 builds with C and Zig bindings.
Stars: ✭ 87 (+234.62%)
Mutual labels:  v8
Examples
A collection of examples of Neon
Stars: ✭ 202 (+676.92%)
Mutual labels:  v8

V8 Docker Image

docker_v8_7 3 255

V8

From https://developers.google.com/v8/:

V8 is Google’s open source high-performance JavaScript engine, written in C++ and used in Google Chrome, the open source browser from Google, and in Node.js, among others.

Usage

$ docker pull andreburgaud/d8

V8 Enhanced Shell

$ docker run --rm -it andreburgaud/d8:9.0.56 shell
Options: --harmony --harmony-shipping --harmony-top-level-await --harmony-intl-dateformat-day-period
         --harmony-sharedarraybuffer --harmony-atomics --harmony-weak-refs --harmony-string-replaceall
         --harmony-logical-assignment --harmony-atomics-waitasync --harmony-relative-indexing-methods
Use quit() or Ctrl-D (i.e. EOF) to exit the D8 Shell
V8 version 9.0.0 (candidate)
d8>
  • The default V8 shell is wrapped with rlwrap (https://github.com/hanslub42/rlwrap) to enhance the experience with the REPL (e.g. use arrow keys to recall previous/next lines).

  • The harmony options are automatically injected via the entrypoint.sh script.

  • Additional V8 options in addition to the harmony ones can be passed at the command line:

$ docker run --rm -it andreburgaud/d8 shell --dump-counters

Upon exciting the d8 shell, the v8 counters will be dumped to the terminal. The counters are listed alphabetically with their values.

Using Multiline

When starting the d8 container with command shell, as follow:

$ docker run --rm -it andreburgaud/d8 shell

You also have the ability to write statements across several lines, by ending lines with a \ (backslash):

d8> function f(n) { \
    print(n); \
}
undefined
d8> f('TEST');
TEST
undefined
d8>

What is Harmony?

When ECMAScript 4 (ES4) was abandoned in 2008, some of its features were rolled into a project codenamed ECMAScript Harmony. ES6 later renamed ES2015 was the first "ECMAScript Harmony" specification and is also known as "ES6 Harmony". The V8 harmony options enable specific features that may not yet be part of the default engine features.

Harmony Flags with Version 9.x

The following flags are enabled when starting the D8 repl docker run --rm -it andreburgaud/d8 shell:

--harmony                             (enable all completed harmony features)
--harmony-shipping                    (enable all shipped harmony features)
--harmony-top-level-await             (enable "harmony top level await")
--harmony-intl-dateformat-day-period  (enable "Add dayPeriod option to DateTimeFormat")
--harmony-sharedarraybuffer           (enable "harmony sharedarraybuffer")
--harmony-atomics                     (enable "harmony Atomics.waitAsync")
--harmony-weak-refs                   (enable "harmony weak references")
--harmony-string-replaceall           (enable "harmony String.prototype.replaceAll")
--harmony-logical-assignment          (enable "harmony logical assignment")
--harmony-atomics-waitasync           (enable "harmony Atomics.waitAsync")
--harmony-relative-indexing-methods   (enable "harmony relative indexing methods")

Help

$ docker run --rm -it andreburgaud/d8 help

Display the commands available via the docker container.

Default V8 Shell

$ docker run --rm -it andreburgaud/d8

Internal V8 help

$ docker run --rm -it andreburgaud/d8 --help

Start D8 with custom options

$ docker run --rm -it andreburgaud/d8 --dump-counters

Executing a JavaScript file

Assuming that the following hello.js file is in the folder examples of your current working directory:

console.log('Hello World!');

Execute:

docker run --rm -it -v $PWD/examples:/examples/ andreburgaud/d8 /examples/hello.js
Hello World!

Build Local Image

$ git clone https://github.com/andreburgaud/docker-v8.git
$ cd docker-v8
$ docker build -t d8 .

Note: the compilation may take some time depending on your hardware. For example it takes about 30 minutes on a 3.5GHz four core iMac with 24GB of RAM.

Resources

MIT License

See the license file

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].