gval
Expression evaluation in golang (by PaesslerAG)
goja
ECMAScript/JavaScript engine in pure Go (by dop251)
Our great sponsors
gval | goja | |
---|---|---|
0 | 10 | |
484 | 2,933 | |
3.3% | - | |
3.9 | 8.1 | |
6 months ago | 6 days ago | |
Go | Go | |
BSD 3-clause "New" or "Revised" License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gval
Posts with mentions or reviews of gval.
We have used some of these posts to build our list of alternatives
and similar projects.
We haven't tracked posts mentioning gval yet.
Tracking mentions began in Dec 2020.
goja
Posts with mentions or reviews of goja.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-05-13.
-
Show HN: A Full-Stack Web Framework Written in Go
- Bud will eventually ship with it's own JS evaluator. Either through https://github.com/dop251/goja or through porting https://github.com/bellard/quickjs to Go (~25kloc of C)
-
Choosing scripting extension - need advice
For JS in Go use goja, which offers excellent integration with Go. Also I maintain an extension that adds Common-JS compatibility to it.
-
Chrome 0day is being exploited now for CVE-2022-1096; update immediately
There are certainly other javascript implementations. For example, here's one I stumbled upon recently that's written in plain Go: https://github.com/dop251/goja
Of course, it won't help you since it's not built into a web browser.
-
Rendering Vega Charts in Pure Go
govega is a kind of beautifully weird wrapper around Vega and goja that lets us render great looking Vega charts, graphs, etc.. in pure Go. The library is pretty self explanatory and there are are a few examples and a command line tool that can take Vega spec files and Data blobs and plop out SVGs.
-
Migrating from nodejs to go codebase using gopherjs
If you have some scripting you want to do in javascript permanently (or even just for a while) after having your main project running in Go, it might be useful to look at embedding v8 or quickjs since those options would give you a fully featured runtime, but they would mean cgo. If you want pure Go, you might be able to use https://github.com/dop251/goja (which can even run a typescript compiler and/or babel if you need) but your use case is still important. A lot of what you are doing might be from the os and fs libraries, etc, which are not part of the runtime but rather libraries, and in the case of many, they might be written in C. Hopefully you can add the little bit you need or ignore it and do that work in Go.
-
Compiling a Go program into a native binary for Nintendo Switch™
There's always goja and the nodejs compatibility library, tho you likely won't get perfect results.
There's pure Go Javascript engines like goja, should be easier to port.
-
How do you use fswatch to reload an http server project on file changes?
Prudence uses JavaScript (the goja engine) to bootstrap your application and keeps track of a global set of "startable" objects. So, once any watched file changes the current startables are stopped and the bootstrap code (which is what might have been changed!) is re-run.
-
Using Javascript plugins in Go
I'm noticed you chose otto for this article instead of goja so I wanted to point out that goja does better in performance tests, is more active, and supports more modern Javascript features
-
Can you recommend open source projects with small codebase, but with high benefits for learning?
If you have some experience and find parsers and interpreters to be pleasant, take a look at https://github.com/dop251/goja because it's a pure Go (instead of calling out to v8 or quickjs via cgo) implementation of es5.1+ which is working it way towards es6+. I think it's a nice place to look if you have experience because the features needed are well defined with standardized tests, and you can work on one small thing at a time as a unit.
What are some alternatives?
When comparing gval and goja you can also consider the following projects:
otto - A JavaScript interpreter in Go (golang)
v8go - Execute JavaScript from Go
expr - Expression language for Go
govaluate - Arbitrary expression evaluation for golang
tengo - A fast script language for Go
go-lua - A Lua VM in Go
gopher-lua - GopherLua: VM and compiler for Lua in Go
go-duktape - [abandoned] Duktape JavaScript engine bindings for Go
go-python - naive go bindings to the CPython2 C-API
core - MetaCall: The ultimate polyglot programming experience.
anko - Scriptable interpreter written in golang
golua - Go bindings for Lua C API - in progress