Gojis Save Abandoned

An ECMAScript 2018 (ES9) implementation in Go

Project README

Gojis

Pure Go ECMAScript interpreter.





Gojis is an implementation of ECMAScript 2018 (ES 9). It basically is a JavaScript VM, just like Goja or Otto. The documentation can be found here.

Why

Goja and Otto are both stuck at implementing most features of ES 5.1. This implementation aims to support ES 9, and, after that maybe even ES 10 and later.

What is this Gojis VM good for?

The Gojis VM can be run as a standalone, or you can embed it into your Go application by using the API. Go get it with

go get -u github.com/gojisvm/gojis

Use the Go API

// FIXME: the API is in draft mode, this is subject to change at any time

vm := gojis.NewVM()

vm.SetFunction("greet", func(gojis.Args) gojis.Object {
    vm.Eval(`console.log("Hello World!");`)
    return nil
})

vm.Eval(`greet();`)
/*
    prints:
    Hello World!
*/

Use the CLI

$ gojis test.js
Hello, World!
$ gojis ./src
Hello, World! from test1
Hello, World! from test2
Hello, World! from test3
Hello, World! from test4

Use the Docker image

$ docker run -d -v ./src:/src gojisvm/gojis:latest
Hello, World! from test1
Hello, World! from test2
Hello, World! from test3
Hello, World! from test4

For more documentation, please have a look at the API documentation.

What are the goals?

The primary goal of this project is to have fun coding, as I love to code, but thinking about system designs and architectures is difficult. The ECMAScript language specification (which can be found in /docs), takes care of most of these things already, so a contributor can really focus on implementation and optimization.

Another goal I am trying to achieve is, to provide the Go community with a JavaScript VM that supports at least ES 6 features. Goja and Otto are both stuck at implementing ES 5.1, but this implementation does exactly that.

Current status

There is a milestone to keep track of the implementation progress of ES 9.

License

FOSSA Status

Open Source Agenda is not affiliated with "Gojis" Project. README Source: gojisvm/gojis
Stars
80
Open Issues
43
Last Commit
2 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating