[RESEARCH] JavaScript engines #28

Closed
opened 2020-07-09 17:59:39 +00:00 by kirsle · 1 comment

I'm currently using otto for the embedded JS interpreter for Doodad scripts. It's a pure Go runtime for JS but only supports old-style ES5 syntax (no let or const, etc.)

Some ideas for possible replacement:

QuickJS

https://github.com/lithdew/quickjs

A JavaScript runtime written in C with ES2020 syntax. According to the Go page, should be easily cross-compilable with gcc and mingw. Looks like you can bind Go functions to be callable from the interpreter.

Honorable Mentions

goja

https://github.com/dop251/goja

Seems in the same lines as Otto and only ES5 syntax.

Alternate Languages (Python etc.)

Starlark

https://github.com/google/starlark-go

Starlark is a Python-like language from Google.

I'm currently using [otto](https://github.com/robertkrimen/otto) for the embedded JS interpreter for Doodad scripts. It's a pure Go runtime for JS but only supports old-style ES5 syntax (no `let` or `const`, etc.) Some ideas for possible replacement: ### QuickJS https://github.com/lithdew/quickjs A JavaScript runtime written in C with ES2020 syntax. According to the Go page, should be easily cross-compilable with gcc and mingw. Looks like you can bind Go functions to be callable from the interpreter. ## Honorable Mentions ### goja https://github.com/dop251/goja Seems in the same lines as Otto and only ES5 syntax. ## Alternate Languages (Python etc.) ### Starlark https://github.com/google/starlark-go Starlark is a Python-like language from Google.
kirsle added the
enhancement
label 2020-07-09 17:59:39 +00:00
Poster
Owner

Switched to goja in 4d08bf1d85 which has some useful ES6 syntax support already.

Switched to goja in 4d08bf1d8513f76d9b9e2bde22a86c7c7d4fd6d6 which has some useful ES6 syntax support already.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SketchyMaze/doodle#28
There is no content yet.