d8 is V8 developer shell1: a powerful JavaScript interpreter and a convenient tool for developing CLI-based utilities.
Useful documentation for d8 include:
- the d8 page on v8.dev
- Kevin Ennis’s d8 guide
- the getting started with d8 pages on RIP tutorial
Of particular interest:
New Worker with inlined script
This undocumented syntax2 allows for spawning a Worker and passing the script parameter directly as a string.
Note that d8 does not support the location construct for passing environment variables to a new worker: instead simply set the variables directly in the code of the worker.
- d8 stands for developer the same way i18n stands for internationalization and l10n stands for localization.
- Look for the
Shell::WorkerNew
method in the d8 source.
Laisser un commentaire