V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
hanxiV2EX
V2EX  ›  Go 编程语言

求推荐一个 go 里运行 js 的方案

  •  
  •   hanxiV2EX ·
    hanxi · 3 月 28 日 via Android · 1723 次点击

    目前试用了 goja ,很好用,就是语法不全,新一点语法的跑不了。

    8 条回复    2026-03-29 19:35:51 +08:00
    yulon
        2
    yulon  
       3 月 28 日
    在乎资源 quickjs ,不在乎资源直接起一个 webview
    wbrobot
        3
    wbrobot  
       3 月 28 日
    goja 不是已经完成 ES6 支持了吗?新语法是什么?
    haohello
        4
    haohello  
       3 月 28 日
    pocketbase 里是不是就是使用的 goja 啊
    wbrobot
        5
    wbrobot  
       3 月 28 日
    哦,不好意思,刚才 goja 看了一下 ES2016+只支持 66%
    你试试 https://github.com/fastschema/qjs 这个 ES2016+支持到 93%
    fgwmlhdkkkw
        6
    fgwmlhdkkkw  
       3 月 28 日
    虽然没做过,但是集成 V8 应该有现成的方案吧。
    crackidz
        7
    crackidz  
       3 月 28 日
    quickjs 一套啊
    hanxiV2EX
        8
    hanxiV2EX  
    OP
       3 月 29 日
    找到了这个 cgo-free 的 quickjs 。 我先试试 https://gitlab.com/cznic/quickjs/
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2724 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 08:41 · PVG 16:41 · LAX 01:41 · JFK 04:41
    ♥ Do have faith in what you're doing.