Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Continuum is a JavaScript virtual machine built in JavaScript. It assembles bytecode from sourcecode and executes it an ES6 runtime environment. The code of the VM is written in ES3 level JavaScript, which means it can run in browsers as old as IE6. (though currently it's only been tested in IE9+ and there's probably some kinks to work out in older IE's).
ES6 is still an unfinished specification and is still a moving target
Continuum probably works in every modern engine, but has not been tested.
Currently known to work in:
Will soon work in:
In the browser, use the combined continuum.js or continuum.min.js. In node
npm install continuum
In the browser an object named continuum
is added to the window, or in node it's the object returned by require('continuum')
.
Usage of continuum is quite simple and can basically be treated like using eval
or node's vm.runInContext
. Supply the code, get the result. In ES6 a "Realm" is basically the container for a context. A Realm has a 'global' property which is its global object, and a number of properties that specific to each Realm instance, such as the list of builtins like Array, Function, Object, etc.
var realm = continuum.createRealm();
var $array = realm.evaluate('[5, 10, 15, 20]');
// you can use the ES internal functions to directly interact with objects
console.log($array.Get(0)) // 5
console.log($array.Get('map')) // $Function object
// these two lines have the same result
var $Function = realm.evaluate('Function');
var $Function = realm.global.Get('Function');
// if your code uses the module system then it must be run asynchronously
realm.evaluateAsync('module F = "@function"; F', function(result){
console.log(result) // $Module { Function, call, apply, bind }
});
module std = '@std'
or import call from '@function'
A Realm is the main thing you interact with. Each realm has a global object with a unique set of builtin globals. A realm is roughly equivalent to an iframe or a node vm context.
These are emitted by the VM to indicate changes to the state of execution and provide access to information about related objects.
debugger
statement is encountered. A function which will resume execution is passed to the callback, and is also available as realm.resume
.These are emitted by functions from inside the VM to simulate things like input/output and require some implementation on your part to do anything useful.
A Renderer is a visitor used to introspect VM objects and values.
...TODO docs...
An Assembler is used to convert AST into bytecode and static script information.
...TODO docs...
A Script object contains all the static information about a chunk of code: the given options, original source, AST, bytecode, and the compiled thunk that executes the bytecode. Scripts don't contain runtime information so they are portable between realms and can be executed multiple times. When using realm.evaluate
or realm.evaluateAsync
with a Script, it can be executed directly without compiling again.
...TODO docs...
A Code object contains the compiled bytecode of a Script. It also contains most of the static semantics derived from the source such as bound names, declarations, imports/exports, etc. In the short term future it is planned for Code objects to be serializable to a portable form such that code can be compiled once and then redistributed and executed in this form.
...TODO docs...
FAQs
A JavaScript (ES6) bytecode virtual machine written in JavaScript
The npm package continuum receives a total of 1 weekly downloads. As such, continuum popularity was classified as not popular.
We found that continuum demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.