quickjs-go
quickjs-go copied to clipboard
Go bindings to QuickJS
Is it possible to write a file or import the std library?
构建失败
D:/c/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Dwarf Error: Can't find .debug_ranges section. D:/Users/111/go/pkg/mod/github.com/buke/[email protected]/deps/libs/windows_amd64/libquickjs.a(quickjs-libc.nolto.o):quickjs-libc.c:(.text+0x2c5e): undefined reference to `__imp___p__environ
This is the error message I'm seeing. ``` $ go build # example/hello C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/allai/go/pkg/mod/github.com/buke/[email protected]/deps/libs/windows_amd64/libquickjs.a(quickjs.nolto.o): in function `js_atomics_wait': D:\a\quickjs-go\quickjs-go\deps\quickjs/quickjs.c:55522: undefined reference to...
我使用Eval声明了一个方法,然后通过ctx.Invoke 调用它,时而成功,时而失败. reqRT, err := DefaultContext.Eval(`(request) => {` + l.config.ReqJsScript + `return request;}`) defer reqRT.Free() if err != nil || DefaultContext.Exception() != nil { log.Error(err) log.Error(DefaultContext.Exception()) } reqVal := DefaultContext.Object()...
我在生成字节码时,需要根据脚本载入所有模块,所以是否可以暴露载入模块的回调? 另外,我想要调用脚本内的函数,通过Value创建了参数,但是不管我是否手动free,都会遇到退出时gc泄露的情况。 请问我该怎么处理? 还有一些情况,我一些情况下无法用立即数传回需要的对象。用全局对象就可以读出来。请问有什么信息可以给我吗?
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 2025/04/29 22:36:38 /tmp/go-link-4021400276/000002.o: In function `_cgo_e84016e3a4b5_Cfunc_JS_NewString': 2025/04/29 22:36:38 /tmp/go-build/cgo-gcc-prolog:510: undefined reference to `JS_NewString' 2025/04/29 22:36:38 /tmp/go-link-4021400276/000004.o: In function `_cgo_e84016e3a4b5_Cfunc_JS_AddIntrinsicBigDecimal': 2025/04/29 22:36:38 /tmp/go-build/cgo-gcc-prolog:49: undefined...
> /usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /usr/bin/ld: /tmp/bs_cache/go/pkg/mod/github.com/buke/[email protected]/deps/libs/linux_amd64/libquickjs.a(quickjs.nolto.o): unable to initialize decompress status for section .debug_info /usr/bin/ld: /tmp/bs_cache/go/pkg/mod/github.com/buke/[email protected]/deps/libs/linux_amd64/libquickjs.a(quickjs.nolto.o): unable to initialize decompress status for section .debug_info /usr/bin/ld: /tmp/bs_cache/go/pkg/mod/github.com/buke/[email protected]/deps/libs/linux_amd64/libquickjs.a(quickjs.nolto.o):...
Closes #390
We have an application where we set the interrupt handler. When running tests, every now and then the following panic pops up: > interface conversion: interface {} is func(*quickjs.Context, quickjs.Value,...