Execute JavaScript from Go

Execute JavaScript from Go

Github release Go Report Card Go Reference CI V8 Build codecov FOSSA Status #v8go Slack Channel

V8 Gopher based on original artwork from the amazing Renee French

Usage

import "rogchap.com/v8go"

Running a script

ctx, _ := v8go.NewContext() // creates a new V8 context with a new Isolate aka VM
ctx.RunScript("const add = (a, b) => a + b", "math.js") // executes a script on the global context
ctx.RunScript("const result = add(3, 4)", "main.js") // any functions previously added to the context can be called
val, _ := ctx.RunScript("result", "value.js") // return a value in JavaScript back to Go
fmt.Printf("addition result: %s", val)

One VM, many contexts

iso, _ := v8go.NewIsolate() // creates a new JavaScript VM
ctx1, _ := v8go.NewContext(iso) // new context within the VM
ctx1.RunScript("const multiply = (a, b) => a * b", "math.js")

ctx2, _ := v8go.NewContext(iso) // another context on the same VM
if _, err := ctx2.RunScript("multiply(3, 4)", "main.js"); err != nil {
  // this will error as multiply is not defined in this context
}

JavaScript function with Go callback

iso, _ := v8go.NewIsolate() // create a new VM
// a template that represents a JS function
printfn, _ := v8go.NewFunctionTemplate(iso, func(info *v8go.FunctionCallbackInfo) *v8go.Value {
    fmt.Printf("%v", info.Args()) // when the JS function is called this Go callback will execute
    return nil // you can return a value back to the JS caller if required
})
global, _ := v8go.NewObjectTemplate(iso) // a template that represents a JS Object
global.Set("print", printfn) // sets the "print" property of the Object to our function
ctx, _ := v8go.NewContext(iso, global) // new Context with the global Object set to our object template
ctx.RunScript("print('foo')", "print.js") // will execute the Go callback with a single argunent 'foo'

Update a JavaScript object from Go

ctx, _ := v8go.NewContext() // new context with a default VM
obj := ctx.Global() // get the global object from the context
obj.Set("version", "v1.0.0") // set the property "version" on the object
val, _ := ctx.RunScript("version", "version.js") // global object will have the property set within the JS VM
fmt.Printf("version: %s", val)

if obj.Has("version") { // check if a property exists on the object
    obj.Delete("version") // remove the property from the object
}

JavaScript errors

val, err := ctx.RunScript(src, filename)
if err != nil {
  err = err.(v8go.JSError) // JavaScript errors will be returned as the JSError struct
  fmt.Println(err.Message) // the message of the exception thrown
  fmt.Println(err.Location) // the filename, line number and the column where the error occured
  fmt.Println(err.StackTrace) // the full stack trace of the error, if available

  fmt.Printf("javascript error: %v", err) // will format the standard error message
  fmt.Printf("javascript stack trace: %+v", err) // will format the full error stack trace
}

Terminate long running scripts

vals := make(chan *v8go.Value, 1)
errs := make(chan error, 1)

go func() {
    val, err := ctx.RunScript(script, "forever.js") // exec a long running script
    if err != nil {
        errs <- err
        return
    }
    vals <- val
}()

select {
case val := <- vals:
    // sucess
case err := <- errs:
    // javascript error
case <- time.After(200 * time.Milliseconds):
    vm, _ := ctx.Isolate() // get the Isolate from the context
    vm.TerminateExecution() // terminate the execution 
    err := <- errs // will get a termination error back from the running script
}

Documentation

Go Reference & more examples: https://pkg.go.dev/rogchap.com/v8go

Support

If you would like to ask questions about this library or want to keep up-to-date with the latest changes and releases, please join the #v8go channel on Gophers Slack. Click here to join the Gophers Slack community!

Windows

While no prebuilt static V8 library is included for Windows, MSYS2 provides a package containing a dynamically linked V8 library that works.

To set this up:

  1. Install MSYS2 (https://www.msys2.org/)
  2. Add the Mingw-w64 bin to your PATH environment variable (C:\msys64\mingw64\bin by default)
  3. Open MSYS2 MSYS and execute pacman -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-v8
  4. This will allow building projects that depend on v8go, but, in order to actually run them, you will need to copy the snapshot_blob.bin file from the Mingw-w64 bin folder to your program's working directory (which is typically wherever main.go is)

V8 requires 64-bit on Windows, therefore will not work on 32-bit systems.

V8 dependency

V8 version: 8.9.255.20 (March 2021)

In order to make v8go usable as a standard Go package, prebuilt static libraries of V8 are included for Linux and macOS ie. you should not require to build V8 yourself.

Due to security concerns of binary blobs hiding malicious code, the V8 binary is built via CI ONLY.

Project Goals

To provide a high quality, idiomatic, Go binding to the V8 C++ API.

The API should match the original API as closely as possible, but with an API that Gophers (Go enthusiasts) expect. For example: using multiple return values to return both result and error from a function, rather than throwing an exception.

This project also aims to keep up-to-date with the latest (stable) release of V8.

License

FOSSA Status

Development

Upgrading the V8 binaries

This process is non-trivial, and hopefully we can automate more of this in the future.

  1. Make sure to clone the projects submodules (ie. the V8's depot_tools project): git submodule update --init --recursive
  2. Add the depot_tools folder to your PATH eg: export PATH=~/Development/rogchap/v8go/deps/depot_tools:$PATH
  3. From the deps folder run fetch v8; you only need to do this once, if you don't already have the V8 source.
  4. Find the current stable release (v8_version) here: https://omahaproxy.appspot.com
  5. Create a new git branch from master eg. git checkout -b v8_7_upgrade
  6. Enter the v8 folder and fetch all the latest git branches: cd deps/v8 && git fetch
  7. Find the right branch-heads/** to checkout, for example if the v8_version is 8.7.220.31 then you want to git checkout branch-heads/8.7. You can check all the branch-heads with git branch --remotes | grep branch-heads/
  8. Copy all the contents of deps/v8/include to deps/include making sure not to delete any of the vendor.go files, which are required for users that are using go mod vendor. If there are any new folders added, make sure to create new vendor.go files in each folder within deps/include and update cgo.go.
  9. Optionally build the V8 binary for your OS: cd deps && ./build.py. V8 is a large project, and building the binary can take up to 30 minutes. Once built all the tests should still pass via go test -v .
  10. Commit your changes, making sure that the git submodules have been updated to the new checksum for the version of V8. Make sure NOT to add your build of the binary, as this will be build via CI.
  11. Because the build is so long, this is not automatically triggered. Go to the V8 Build Github Action, Select "Run workflow", and select your pushed branch eg. v8_7_upgrade.
  12. Once built, this should open 2 PRs against your branch to add the libv8.a for both macOS and linux; merge these PRs into your branch. You are now ready to raise the PR against master with the latest version of V8.

Formatting

Go has go fmt, C has clang-format. Any changes to the v8go.h|cc should be formated with clang-format with the "Chromium" Coding style. This can be done easily by running the go generate command.

brew install clang-format to install on macOS.


V8 Gopher image based on original artwork from the amazing Renee French.

Owner
Roger Chapman
A polyglot engineer, that has found his passion with the Go programming language.
Roger Chapman
Comments
  • libv8.a bundled with v0.3.0 doesn't work with golang Docker image

    libv8.a bundled with v0.3.0 doesn't work with golang Docker image

    Testing with a very basic main.go

    package main
    
    import "rogchap.com/v8go"
    
    func main() {
    	if _, err := v8go.NewIsolate(); err != nil {
    		panic(err)
    	}
    }
    

    And the following Dockerfile

    FROM golang:1.15
    
    WORKDIR /go/src/v8
    COPY . .
    RUN go run main.go
    

    I get this from docker build .

    Sending build context to Docker daemon  75.76MB
    Step 1/4 : FROM golang:1.15
     ---> 05c8f6d2538a
    Step 2/4 : WORKDIR /go/src/v8
     ---> Using cache
     ---> 70761780e417
    Step 3/4 : COPY . .
     ---> 96c01a616e96
    Step 4/4 : RUN go run main.go
     ---> Running in f434a5b958aa
    # rogchap.com/v8go
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(isolate.o): in function `std::_Sp_counted_ptr_inplace<v8::internal::Counters, std::allocator<v8::internal::Counters>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    isolate.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88internal8CountersESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN2v88internal8CountersESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(isolate.o): in function `std::_Sp_counted_ptr_inplace<v8::internal::metrics::Recorder, std::allocator<v8::internal::metrics::Recorder>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    isolate.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88internal7metrics8RecorderESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN2v88internal7metrics8RecorderESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(objects.o): in function `std::_Sp_counted_ptr_inplace<v8::internal::wasm::GlobalWasmCodeRef, std::allocator<v8::internal::wasm::GlobalWasmCodeRef>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    objects.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88internal4wasm17GlobalWasmCodeRefESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN2v88internal4wasm17GlobalWasmCodeRefESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(wasm-code-manager.o): in function `std::_Sp_counted_ptr_inplace<v8::internal::OwnedVector<unsigned char const>, std::allocator<v8::internal::OwnedVector<unsigned char const> >, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    wasm-code-manager.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88internal11OwnedVectorIKhEESaIS4_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN2v88internal11OwnedVectorIKhEESaIS4_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(wasm-code-manager.o): in function `std::_Sp_counted_ptr_inplace<v8::internal::wasm::(anonymous namespace)::NativeModuleWireBytesStorage, std::allocator<v8::internal::wasm::(anonymous namespace)::NativeModuleWireBytesStorage>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    wasm-code-manager.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88internal4wasm12_GLOBAL__N_128NativeModuleWireBytesStorageESaIS4_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(wasm-engine.o):wasm-engine.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88internal4wasm10WasmEngineESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN2v88internal4wasm10WasmEngineESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): more undefined references to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)' follow
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(typer.o): in function `v8::internal::compiler::Typer::Visitor::UpdateType(v8::internal::compiler::Node*, v8::internal::compiler::Type)':
    typer.cc:(.text._ZN2v88internal8compiler5Typer7Visitor10UpdateTypeEPNS1_4NodeENS1_4TypeE[_ZN2v88internal8compiler5Typer7Visitor10UpdateTypeEPNS1_4NodeENS1_4TypeE]+0xd9): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(verifier.o): in function `v8::internal::compiler::Verifier::Visitor::CheckNotTyped(v8::internal::compiler::Node*)':
    verifier.cc:(.text._ZN2v88internal8compiler8Verifier7Visitor13CheckNotTypedEPNS1_4NodeE[_ZN2v88internal8compiler8Verifier7Visitor13CheckNotTypedEPNS1_4NodeE]+0x4f): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(verifier.o): in function `v8::internal::compiler::Verifier::Visitor::CheckOutput(v8::internal::compiler::Node*, v8::internal::compiler::Node*, int, char const*)':
    verifier.cc:(.text._ZN2v88internal8compiler8Verifier7Visitor11CheckOutputEPNS1_4NodeES5_iPKc[_ZN2v88internal8compiler8Verifier7Visitor11CheckOutputEPNS1_4NodeES5_iPKc]+0x5e): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(verifier.o): in function `v8::internal::compiler::Verifier::Visitor::CheckTypeIs(v8::internal::compiler::Node*, v8::internal::compiler::Type)':
    verifier.cc:(.text._ZN2v88internal8compiler8Verifier7Visitor11CheckTypeIsEPNS1_4NodeENS1_4TypeE[_ZN2v88internal8compiler8Verifier7Visitor11CheckTypeIsEPNS1_4NodeENS1_4TypeE]+0x79): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(verifier.o): in function `v8::internal::compiler::Verifier::Visitor::CheckValueInputIs(v8::internal::compiler::Node*, int, v8::internal::compiler::Type)':
    verifier.cc:(.text._ZN2v88internal8compiler8Verifier7Visitor17CheckValueInputIsEPNS1_4NodeEiNS1_4TypeE[_ZN2v88internal8compiler8Verifier7Visitor17CheckValueInputIsEPNS1_4NodeEiNS1_4TypeE]+0x11e): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(module-compiler.o): in function `std::_Sp_counted_ptr_inplace<v8::internal::wasm::JSToWasmWrapperCompilationUnit, std::allocator<v8::internal::wasm::JSToWasmWrapperCompilationUnit>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    module-compiler.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88internal4wasm30JSToWasmWrapperCompilationUnitESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN2v88internal4wasm30JSToWasmWrapperCompilationUnitESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(module-compiler.o): in function `std::_Sp_counted_ptr_inplace<v8::internal::wasm::(anonymous namespace)::BackgroundCompileToken, std::allocator<v8::internal::wasm::(anonymous namespace)::BackgroundCompileToken>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    module-compiler.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88internal4wasm12_GLOBAL__N_122BackgroundCompileTokenESaIS4_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(module-compiler.o): in function `std::_Sp_counted_ptr_inplace<std::atomic<int>, std::allocator<std::atomic<int> >, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    module-compiler.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceISt6atomicIiESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceISt6atomicIiESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(module-compiler.o): in function `std::_Sp_counted_ptr_inplace<v8::base::Semaphore, std::allocator<v8::base::Semaphore>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    module-compiler.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v84base9SemaphoreESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN2v84base9SemaphoreESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(streaming-decoder.o): in function `std::_Sp_counted_ptr_inplace<v8::internal::wasm::AsyncStreamingDecoder::SectionBuffer, std::allocator<v8::internal::wasm::AsyncStreamingDecoder::SectionBuffer>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    streaming-decoder.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88internal4wasm21AsyncStreamingDecoder13SectionBufferESaIS4_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN2v88internal4wasm21AsyncStreamingDecoder13SectionBufferESaIS4_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(machine-graph-verifier.o): in function `v8::internal::compiler::MachineGraphVerifier::Run(v8::internal::compiler::Graph*, v8::internal::compiler::Schedule const*, v8::internal::compiler::Linkage*, bool, char const*, v8::internal::Zone*)':
    machine-graph-verifier.cc:(.text._ZN2v88internal8compiler20MachineGraphVerifier3RunEPNS1_5GraphEPKNS1_8ScheduleEPNS1_7LinkageEbPKcPNS0_4ZoneE+0x12f7): undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(machine-graph-verifier.o): in function `v8::internal::compiler::(anonymous namespace)::MachineRepresentationChecker::CheckValueInputForInt64Op(v8::internal::compiler::Node const*, int)':
    machine-graph-verifier.cc:(.text._ZN2v88internal8compiler12_GLOBAL__N_128MachineRepresentationChecker25CheckValueInputForInt64OpEPKNS1_4NodeEi+0xd3): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: machine-graph-verifier.cc:(.text._ZN2v88internal8compiler12_GLOBAL__N_128MachineRepresentationChecker25CheckValueInputForInt64OpEPKNS1_4NodeEi+0x178): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(machine-graph-verifier.o): in function `v8::internal::compiler::(anonymous namespace)::MachineRepresentationChecker::CheckValueInputRepresentationIs(v8::internal::compiler::Node const*, int, v8::internal::MachineRepresentation)':
    machine-graph-verifier.cc:(.text._ZN2v88internal8compiler12_GLOBAL__N_128MachineRepresentationChecker31CheckValueInputRepresentationIsEPKNS1_4NodeEiNS0_21MachineRepresentationE+0xf5): undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(machine-graph-verifier.o): in function `v8::internal::compiler::(anonymous namespace)::MachineRepresentationChecker::CheckValueInputIsCompressedOrTagged(v8::internal::compiler::Node const*, int)':
    machine-graph-verifier.cc:(.text._ZN2v88internal8compiler12_GLOBAL__N_128MachineRepresentationChecker35CheckValueInputIsCompressedOrTaggedEPKNS1_4NodeEi+0xf5): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(machine-graph-verifier.o): in function `v8::internal::compiler::(anonymous namespace)::MachineRepresentationChecker::CheckValueInputIsTagged(v8::internal::compiler::Node const*, int)':
    machine-graph-verifier.cc:(.text._ZN2v88internal8compiler12_GLOBAL__N_128MachineRepresentationChecker23CheckValueInputIsTaggedEPKNS1_4NodeEi+0xf5): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(machine-graph-verifier.o): in function `v8::internal::compiler::(anonymous namespace)::MachineRepresentationChecker::CheckValueInputForFloat64Op(v8::internal::compiler::Node const*, int)':
    machine-graph-verifier.cc:(.text._ZN2v88internal8compiler12_GLOBAL__N_128MachineRepresentationChecker27CheckValueInputForFloat64OpEPKNS1_4NodeEi+0xf2): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(machine-graph-verifier.o): in function `v8::internal::compiler::(anonymous namespace)::MachineRepresentationChecker::CheckValueInputIsTaggedOrPointer(v8::internal::compiler::Node const*, int)':
    machine-graph-verifier.cc:(.text._ZN2v88internal8compiler12_GLOBAL__N_128MachineRepresentationChecker32CheckValueInputIsTaggedOrPointerEPKNS1_4NodeEi+0xf5): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(machine-graph-verifier.o): in function `v8::internal::compiler::(anonymous namespace)::MachineRepresentationChecker::CheckValueInputForInt32Op(v8::internal::compiler::Node const*, int)':
    machine-graph-verifier.cc:(.text._ZN2v88internal8compiler12_GLOBAL__N_128MachineRepresentationChecker25CheckValueInputForInt32OpEPKNS1_4NodeEi+0xcf): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(machine-graph-verifier.o):machine-graph-verifier.cc:(.text._ZN2v88internal8compiler12_GLOBAL__N_128MachineRepresentationChecker25CheckValueInputForInt32OpEPKNS1_4NodeEi+0x137): more undefined references to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()' follow
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(default-platform.o): in function `std::_Sp_counted_ptr_inplace<v8::platform::DefaultJobState, std::allocator<v8::platform::DefaultJobState>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    default-platform.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88platform15DefaultJobStateESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN2v88platform15DefaultJobStateESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(default-platform.o): in function `std::_Sp_counted_ptr_inplace<v8::platform::DefaultWorkerThreadsTaskRunner, std::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    default-platform.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88platform30DefaultWorkerThreadsTaskRunnerESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN2v88platform30DefaultWorkerThreadsTaskRunnerESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    /usr/bin/ld: vendor/rogchap.com/v8go/deps/linux-x86_64/libv8.a(default-platform.o): in function `std::_Sp_counted_ptr_inplace<v8::platform::DefaultForegroundTaskRunner, std::allocator<v8::platform::DefaultForegroundTaskRunner>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
    default-platform.cc:(.text._ZNSt23_Sp_counted_ptr_inplaceIN2v88platform27DefaultForegroundTaskRunnerESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN2v88platform27DefaultForegroundTaskRunnerESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x16): undefined reference to `std::_Sp_make_shared_tag::_S_eq(std::type_info const&)'
    collect2: error: ld returned 1 exit status
    The command '/bin/sh -c go run main.go' returned a non-zero code: 2
    

    Replacing the deps folder with the one from v0.2.0 works.

    Also, after a go mod vendor, I need to copy the deps folder manually. This can be solved by including a .go file with a dummy variable in deps and each of its subdirectories, like this https://github.com/confluentinc/confluent-kafka-go/blob/master/kafka/librdkafka/librdkafka.go

  • Possible memory leak

    Possible memory leak

    Hi,

    I've been playing with v8go, and so far liking it a lot!

    I'm running into a fatal error when benchmarking isolate initialization (and running a simple workload). Here's my code:

    package main
    
    import (
    	"encoding/json"
    	"fmt"
    	"math/rand"
    
    	"rogchap.com/v8go"
    )
    
    const n = 10000 // tweak this
    
    const script = `
    	const process = (record) => {
    		const res = [];
    		for (let [k, v] of Object.entries(record)) {
    			res.push({
    				name: k,
    				value: v,
    			});
    		}
    		return JSON.stringify(res);
    	};
    `
    
    func main() {
    	for i := 0; i < n; i++ {
    		vm, _ := v8go.NewIsolate()
    		ctx, _ := v8go.NewContext(vm)
    		ctx.RunScript(script, "main.js")
    		str, _ := json.Marshal(makeObject())
    		cmd := fmt.Sprintf("process(%s)", str)
    		ctx.RunScript(cmd, "cmd.js")
    	}
    }
    
    func makeObject() interface{} {
    	return map[string]interface{}{
    		"a": rand.Intn(1000000),
    		"b": "AAAABBBBAAAABBBBAAAABBBBAAAABBBBAAAABBBB",
    	}
    }
    

    When running it with n = 1000, it completes just fine. But running with n = 10000 gives me this error:

    fatal error: unexpected signal during runtime execution
    [signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x4204ba0]
    
    runtime stack:
    runtime.throw(0x4ac92d0, 0x2a)
    	/usr/local/go/src/runtime/panic.go:617 +0x72
    runtime.sigpanic()
    	/usr/local/go/src/runtime/signal_unix.go:374 +0x4a9
    
    goroutine 18 [syscall]:
    runtime.cgocall(0x40b5370, 0xc0000466b8, 0x0)
    	/usr/local/go/src/runtime/cgocall.go:128 +0x5b fp=0xc000046688 sp=0xc000046650 pc=0x4004dfb
    rogchap.com/v8go._Cfunc_ValueDispose(0x9ceed8d0)
    	_cgo_gotypes.go:179 +0x41 fp=0xc0000466b8 sp=0xc000046688 pc=0x40b3961
    rogchap.com/v8go.(*Value).finalizer.func1(0xc000422d58)
    	/Users/benjamin/go/pkg/mod/rogchap.com/[email protected]/value.go:26 +0x5e fp=0xc0000466f8 sp=0xc0000466b8 pc=0x40b4c3e
    rogchap.com/v8go.(*Value).finalizer(0xc000422d58)
    	/Users/benjamin/go/pkg/mod/rogchap.com/[email protected]/value.go:26 +0x2b fp=0xc000046728 sp=0xc0000466f8 pc=0x40b449b
    runtime.call32(0x0, 0x4aca8f0, 0xc0003c2000, 0x1000000010)
    	/usr/local/go/src/runtime/asm_amd64.s:519 +0x3b fp=0xc000046758 sp=0xc000046728 pc=0x40522cb
    runtime.runfinq()
    	/usr/local/go/src/runtime/mfinal.go:222 +0x1e2 fp=0xc0000467e0 sp=0xc000046758 pc=0x40179d2
    runtime.goexit()
    	/usr/local/go/src/runtime/asm_amd64.s:1337 +0x1 fp=0xc0000467e8 sp=0xc0000467e0 pc=0x4053fc1
    created by runtime.createfing
    	/usr/local/go/src/runtime/mfinal.go:156 +0x61
    
    goroutine 1 [syscall]:
    rogchap.com/v8go._Cfunc_NewContext(0x9d8df000, 0x0)
    	_cgo_gotypes.go:139 +0x4a
    rogchap.com/v8go.NewContext.func1(0xc00046a008, 0xc000054ee0)
    	/Users/benjamin/go/pkg/mod/rogchap.com/[email protected]/context.go:35 +0x5e
    rogchap.com/v8go.NewContext(0xc00046a008, 0x0, 0x0, 0x4ac311b)
    	/Users/benjamin/go/pkg/mod/rogchap.com/[email protected]/context.go:35 +0x3d
    main.main()
    	/Users/benjamin/Documents/streamtest/v8/main.go:29 +0x114
    exit status 2
    

    Monitoring the process, I noticed it's allocating several gigabytes of memory until eventually crashing.

    Moving the initialization of cmd out of the loop prevents the crash, but the process still racks up lots of memory. It seems to me that this whole process should be lightweight, as it never runs more than a single isolate at once. Would appreciate some thoughts :)

  • Could not set FunctionTemplate to Global Object.

    Could not set FunctionTemplate to Global Object.

    Hi @rogchap I am writing some polyfills for v8go, but it seems can't set function template to an existing global object:

    obj := ctx.Global()
    
    fetchFn, _ := v8go.NewFunctionTemplate(iso, f.goFetchSync)
    if err := obj.Set("_goFetchSync", fetchFn); err != nil {
        return err
    }
    
    v8go: unsupported object property type `*v8go.FunctionTemplate`
    

    https://github.com/rogchap/v8go#update-a-javascript-object-from-go

  • promise: run callbacks on resolution

    promise: run callbacks on resolution

    This would support ES Modules, since v8's interface returns a promise when running a module to handle top-level await and imports.

    The test does not currently pass:

    --- FAIL: TestPromiseRejected (0.01s) promise_test.go:81: expected Then to be called immediately on already-resolved promise, but was not

  • Promise resolver and promise result

    Promise resolver and promise result

    Enables the (basic) Promise API. eg:

    iso, _ := v8go.NewIsolate()
    global, _ := v8go.NewObjectTemplate(iso)
    
    fetchfn, _ := v8go.NewFunctionTemplate(iso, func(info *v8go.FunctionCallbackInfo) *v8go.Value {
    	args := info.Args()
    	url := args[0].String()
    	resolver, _ := v8go.NewPromiseResolver(info.Context())
    
    	go func() {
    		res, _ := http.Get(url)
    		body, _ := ioutil.ReadAll(res.Body)
    		val, _ := v8go.NewValue(iso, string(body))
    		resolver.Resolve(val)
    	}()
    	return resolver.GetPromise().Value
    })
    global.Set("fetch", fetchfn, v8go.ReadOnly)
    
    ctx, _ := v8go.NewContext(iso, global)
    val, _ := ctx.RunScript("fetch('https://rogchap.com/v8go')", "")
    prom, _ := val.AsPromise()
    
    // wait for the promise to resolve
    for prom.State() == v8go.Pending {
    	continue
    }
    fmt.Printf("%s\n", strings.Split(prom.Result().String(), "\n")[0])
    // Output:
    // <!DOCTYPE html>
    

    resolves #69

  • [feature] How to get the Promise result value?

    [feature] How to get the Promise result value?

    ctx, _ := v8go.NewContext(nil)
    
    val, err := ctx.RunScript(`new Promise((resolve) => setTimeout(() => resolve(1), 1000)).then(console.log)`, "value.js")
    if err != nil {
      panic(err)
    }
    
    fmt.Printf("result: %s", val.String())
    
    result: [object Promise]
    

    I want to get the Promise result, for the example code is 1

  • Build for static V8 library on Windows

    Build for static V8 library on Windows

    This PR adds the bits required to provide a prebuilt static V8 library on Windows, offering basically the same level of end user convenience as on Linux/Mac (i.e. not having to deal with a dozen DLLs in a distribution).

    Existing Windows builds using v8go should not break, the change merely renders the need to package additional files with the executable unnecessary.

  • Consider using panic

    Consider using panic

    Every method in the API returns an error, which makes it unnecessarily cumbersome to use.

    For example

    // NewFunctionTemplate creates a FunctionTemplate for a given callback.
    func NewFunctionTemplate(iso *Isolate, callback FunctionCallback) (*FunctionTemplate, error) {
    	if iso == nil {
    		return nil, errors.New("v8go: failed to create new FunctionTemplate: Isolate cannot be <nil>")
    	}
    	if callback == nil {
    		return nil, errors.New("v8go: failed to create new FunctionTemplate: FunctionCallback cannot be <nil>")
    	}
    
    	cbref := iso.registerCallback(callback)
    
    	tmpl := &template{
    		ptr: C.NewFunctionTemplate(iso.ptr, C.int(cbref)),
    		iso: iso,
    	}
    	runtime.SetFinalizer(tmpl, (*template).finalizer)
    	return &FunctionTemplate{tmpl}, nil
    }
    

    In this case, I would argue that it should panic if either of the parameter are nil, because this is incorrect use of the API and is trivially able to be checked by a caller who might have an Isolate or FunctionCallback of unknown provenance.

    To draw a comparison, strings.Repeat panics if an invalid argument is provided, and I have never heard of that being considered problematic. Instead, returning many errors that can never happen either results in callers needing to do one of 3 things:

    1. Add a panic in their code, in which case, what has been saved? This is what I do, unhappily.
    2. Ignore the error. This is bad, because they would need to view the implementation to know which errors are impossible.
    3. Handle the error. This is time wasted and additional code to maintain

    Obviously it's a breaking change, but I think it would be a welcome one to remove error returns of this sort from the API.

    Thanks for considering.

  • Support MSYS2 MinGW64 builds

    Support MSYS2 MinGW64 builds

    These changes will allow v8go to work for users using the MSYS2 MinGW-w64 toolchain (https://www.msys2.org/) and the v8 package in their package manager, pacman -S mingw-w64-x86_64-v8

    Resolves #7, resolves #44

    Note that the snapshot_blob.bin file will have to exist in your program's working directory. If the default install paths are used, this file is located at C:\msys64\mingw64\bin\snapshot_blob.bin

  • Automate upgrading v8 binaries

    Automate upgrading v8 binaries

    https://github.com/rogchap/v8go#upgrading-the-v8-binaries

    This process is non-trivial, and hopefully we can automate more of this in the future.

    We should automate the workflow described above so that it can be at least manually run to upgrade v8 to the latest release that chrome uses. This workflow can be used to keep v8 up-to-date as well as ready for when a CVE is detected.

  • Build v8 with i18n support

    Build v8 with i18n support

    Problem

    I was getting an ReferenceError: Intl is not defined error from trying to use the Intl JS namespace which is a builtin feature of v8 (https://v8.dev/blog/intl). I found this wasn't working because v8go was building with v8_enable_i18n_support=false.

    Solution

    Removing v8_enable_i18n_support=false from the build configuration and rebuilding solved the problem for me.

    As instructed in the README.md, I didn't add any built binaries to the commit I pushed. I don't have access to run the "V8 Build" Github Action, so that still needs to be done to update the pre-built binaries in order to actually fix this issue.

  • Support for PumpMessageLoop, needed for webassembly

    Support for PumpMessageLoop, needed for webassembly

    Depends on (extends) #356's []byte support.

    I haven't figured out a nice way to polyfill this into WebAssembly.compile yet, but this at least allows you to PumpMessageLoop at all. WebAssembly.compile uses both background and foreground tasks, and if you don't pump the message loop, the foreground tasks never execute, leading to a hanging process.

    See the test case for how to do this. I'm following the idea of make it possible first, then make it nice later.

  • resolves #170 build v8go for musl libc

    resolves #170 build v8go for musl libc

    What I Did

    • create a new workflow to build GN on Alpine (build dependency of v8)
      • it will automatically create a pull request
      • if you don't trust the compiled file available at deps/alpine_x84_64/gn, you can run the workflow again to replace this file
    • add a new workflow to build v8 on Alpine
      • get v8 dependencies from the GitHub runner (ubuntu-20.04) because the script does not work on Alpine
      • use Docker to build v8 on Alpine
      • copy files from the Docker container and create a pull request
    • introduce two Python scripts to split the build task since we cannot get v8 dependencies from Alpine
      • get_v8deps.py : get v8 dependencies
      • compile_v8.py : compile v8
      • build.py uses functions from the get_v8deps.py and compile_v8.py scripts to get dependencies and compile v8 (in one go)
    • add cgo directive for deps/alpine_x86_64 (disclaimer: I don't know what I'm doing 🐶)
      • as far as I understand, it would allow to pass an environment variable CC=musl-gcc to install v8go on Alpine?
    • create a module deps/alpine_x84_64/vendor.go

    resolves #170

  • Fatal javascript OOM in GC during deserialization

    Fatal javascript OOM in GC during deserialization

    Hi,

    if I try to run about 100 concurrent v8 instances, this error occurs.
    It also occurs eventually if I run 10 concurrent instances multiple times.

    Here is the code to reproduce: https://github.com/i5heu/distribution-game/tree/e8e7a5146a1bad3c132d48c0744a410ecdc15421

    run in cloned repository on commit level e8e7a5146a1bad3c132d48c0744a410ecdc15421:

    npm i
    npm run build
    cd backend
    go run .
    

    go with your browser to localhost:3333 and click on "Run" on the right half of the screen.

    Error log:

    
    <--- Last few GCs --->
    
    
    <--- JS stacktrace --->
    
    
    #
    # Fatal javascript OOM in GC during deserialization
    #
    
    
    <--- Last few GCs --->
    
    
    <--- JS stacktrace --->
    
    
    #
    # Fatal javascript OOM in GC during deserialization
    #
    
    
    <--- Last few GCs --->
    
    
    <--- JS stacktrace --->
    
    
    #
    # Fatal javascript OOM in GC during deserialization
    #
    
    
    <--- Last few GCs --->
    
    
    <--- JS stacktrace --->
    
    
    #
    # Fatal javascript OOM in GC during deserialization
    #
    
    
    <--- Last few GCs --->
    
    
    <--- JS stacktrace --->
    
    
    #
    # Fatal javascript OOM in GC during deserialization
    #
    
    
    <--- Last few GCs --->
    
    
    <--- JS stacktrace --->
    
    
    #
    # Fatal javascript OOM in GC during deserialization
    #
    
    
    <--- Last few GCs --->
    
    
    <--- JS stacktrace --->
    
    
    #
    # Fatal javascript OOM in GC during deserialization
    #
    
    
    <--- Last few GCs --->
    
    
    <--- JS stacktrace --->
    
    
    #
    # Fatal javascript OOM in GC during deserialization
    #
    
    SIGTRAP: trace trap
    PC=0x12bfa8e m=13 sigcode=128
    signal arrived during cgo execution
    
    goroutine 643 [syscall]:
    runtime.cgocall(0xa58d50, 0xc0001d1ef0)
            /usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0001d1ec8 sp=0xc0001d1e90 pc=0x80295c
    rogchap.com/v8go._Cfunc_NewIsolate()
            _cgo_gotypes.go:732 +0x49 fp=0xc0001d1ef0 sp=0xc0001d1ec8 pc=0x8eefa9
    rogchap.com/v8go.NewIsolate()
            /root/go/pkg/mod/rogchap.com/[email protected]/isolate.go:59 +0x3c fp=0xc0001d1f28 sp=0xc0001d1ef0 pc=0x8f153c
    main/agent.New({0x0?, 0x0?}, {0xc000410660, 0x13})
            /root/distribution-game/backend/agent/agent.go:11 +0x2d fp=0xc0001d1fb0 sp=0xc0001d1f28 pc=0x8f44ad
    main.runSimulator.func3()
            /root/distribution-game/backend/main.go:67 +0x32 fp=0xc0001d1fe0 sp=0xc0001d1fb0 pc=0xa581b2
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0001d1fe8 sp=0xc0001d1fe0 pc=0x863c61
    created by main.runSimulator
            /root/distribution-game/backend/main.go:67 +0x2f4
    
    goroutine 1 [IO wait]:
    runtime.gopark(0x200000003?, 0xc0000061a0?, 0x0?, 0x0?, 0xc000125be0?)
            /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000125b70 sp=0xc000125b50 pc=0x837016
    runtime.netpollblock(0xc000125bc0?, 0x2?, 0x0?)
            /usr/local/go/src/runtime/netpoll.go:526 +0xf7 fp=0xc000125ba8 sp=0xc000125b70 pc=0x82fb37
    internal/poll.runtime_pollWait(0x7fae627c37c8, 0x72)
            /usr/local/go/src/runtime/netpoll.go:305 +0x89 fp=0xc000125bc8 sp=0xc000125ba8 pc=0x85ea89
    internal/poll.(*pollDesc).wait(0xc000150000?, 0x6?, 0x0)
            /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32 fp=0xc000125bf0 sp=0xc000125bc8 pc=0x8ad2b2
    internal/poll.(*pollDesc).waitRead(...)
            /usr/local/go/src/internal/poll/fd_poll_runtime.go:89
    internal/poll.(*FD).Accept(0xc000150000)
            /usr/local/go/src/internal/poll/fd_unix.go:614 +0x234 fp=0xc000125c88 sp=0xc000125bf0 pc=0x8ae774
    net.(*netFD).accept(0xc000150000)
            /usr/local/go/src/net/fd_unix.go:172 +0x35 fp=0xc000125d40 sp=0xc000125c88 pc=0x97e8f5
    net.(*TCPListener).accept(0xc000012150)
            /usr/local/go/src/net/tcpsock_posix.go:142 +0x28 fp=0xc000125d70 sp=0xc000125d40 pc=0x990628
    net.(*TCPListener).Accept(0xc000012150)
            /usr/local/go/src/net/tcpsock.go:288 +0x3d fp=0xc000125da0 sp=0xc000125d70 pc=0x98f97d
    net/http.(*onceCloseListener).Accept(0xc000000aa0?)
            <autogenerated>:1 +0x2a fp=0xc000125db8 sp=0xc000125da0 pc=0xa4854a
    net/http.(*Server).Serve(0xc00014e000, {0x196b060, 0xc000012150})
            /usr/local/go/src/net/http/server.go:3070 +0x385 fp=0xc000125ee8 sp=0xc000125db8 pc=0xa38dc5
    net/http.(*Server).ListenAndServe(0xc00014e000)
            /usr/local/go/src/net/http/server.go:2999 +0x7d fp=0xc000125f18 sp=0xc000125ee8 pc=0xa389fd
    net/http.ListenAndServe(...)
            /usr/local/go/src/net/http/server.go:3255
    main.main()
            /root/distribution-game/backend/main.go:23 +0xd7 fp=0xc000125f80 sp=0xc000125f18 pc=0xa57af7
    runtime.main()
            /usr/local/go/src/runtime/proc.go:250 +0x212 fp=0xc000125fe0 sp=0xc000125f80 pc=0x836c52
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000125fe8 sp=0xc000125fe0 pc=0x863c61
    
    goroutine 2 [force gc (idle)]:
    runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
            /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000050fb0 sp=0xc000050f90 pc=0x837016
    runtime.goparkunlock(...)
            /usr/local/go/src/runtime/proc.go:369
    runtime.forcegchelper()
            /usr/local/go/src/runtime/proc.go:302 +0xad fp=0xc000050fe0 sp=0xc000050fb0 pc=0x836ead
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000050fe8 sp=0xc000050fe0 pc=0x863c61
    created by runtime.init.6
            /usr/local/go/src/runtime/proc.go:290 +0x25
    
    goroutine 3 [GC sweep wait]:
    runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
            /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000051790 sp=0xc000051770 pc=0x837016
    runtime.goparkunlock(...)
            /usr/local/go/src/runtime/proc.go:369
    runtime.bgsweep(0x0?)
            /usr/local/go/src/runtime/mgcsweep.go:278 +0x8e fp=0xc0000517c8 sp=0xc000051790 pc=0x8237ce
    runtime.gcenable.func1()
            /usr/local/go/src/runtime/mgc.go:178 +0x26 fp=0xc0000517e0 sp=0xc0000517c8 pc=0x818686
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000517e8 sp=0xc0000517e0 pc=0x863c61
    created by runtime.gcenable
            /usr/local/go/src/runtime/mgc.go:178 +0x6b
    
    goroutine 4 [GC scavenge wait]:
    runtime.gopark(0xc000026070?, 0x1967a30?, 0x1?, 0x0?, 0x0?)
            /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000051f70 sp=0xc000051f50 pc=0x837016
    runtime.goparkunlock(...)
            /usr/local/go/src/runtime/proc.go:369
    runtime.(*scavengerState).park(0x2675d20)
            /usr/local/go/src/runtime/mgcscavenge.go:389 +0x53 fp=0xc000051fa0 sp=0xc000051f70 pc=0x821873
    runtime.bgscavenge(0x0?)
            /usr/local/go/src/runtime/mgcscavenge.go:617 +0x45 fp=0xc000051fc8 sp=0xc000051fa0 pc=0x821e45
    runtime.gcenable.func2()
            /usr/local/go/src/runtime/mgc.go:179 +0x26 fp=0xc000051fe0 sp=0xc000051fc8 pc=0x818626
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000051fe8 sp=0xc000051fe0 pc=0x863c61
    created by runtime.gcenable
            /usr/local/go/src/runtime/mgc.go:179 +0xaa
    
    goroutine 5 [finalizer wait]:
    runtime.gopark(0x2676480?, 0xc000007860?, 0x0?, 0x0?, 0xc000050770?)
            /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000050628 sp=0xc000050608 pc=0x837016
    runtime.goparkunlock(...)
            /usr/local/go/src/runtime/proc.go:369
    runtime.runfinq()
            /usr/local/go/src/runtime/mfinal.go:180 +0x10f fp=0xc0000507e0 sp=0xc000050628 pc=0x81778f
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000507e8 sp=0xc0000507e0 pc=0x863c61
    created by runtime.createfing
            /usr/local/go/src/runtime/mfinal.go:157 +0x45
    
    goroutine 6 [IO wait]:
    runtime.gopark(0x2?, 0xb?, 0x0?, 0x0?, 0x4?)
            /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc0001217b8 sp=0xc000121798 pc=0x837016
    runtime.netpollblock(0x898485?, 0x2641510?, 0x0?)
            /usr/local/go/src/runtime/netpoll.go:526 +0xf7 fp=0xc0001217f0 sp=0xc0001217b8 pc=0x82fb37
    internal/poll.runtime_pollWait(0x7fae627c36d8, 0x72)
            /usr/local/go/src/runtime/netpoll.go:305 +0x89 fp=0xc000121810 sp=0xc0001217f0 pc=0x85ea89
    internal/poll.(*pollDesc).wait(0xc000150080?, 0xc000166000?, 0x0)
            /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32 fp=0xc000121838 sp=0xc000121810 pc=0x8ad2b2
    internal/poll.(*pollDesc).waitRead(...)
            /usr/local/go/src/internal/poll/fd_poll_runtime.go:89
    internal/poll.(*FD).Read(0xc000150080, {0xc000166000, 0x1000, 0x1000})
            /usr/local/go/src/internal/poll/fd_unix.go:167 +0x25a fp=0xc0001218b8 sp=0xc000121838 pc=0x8ade5a
    net.(*netFD).Read(0xc000150080, {0xc000166000?, 0x8ad7a6?, 0x1?})
            /usr/local/go/src/net/fd_posix.go:55 +0x29 fp=0xc000121900 sp=0xc0001218b8 pc=0x97d789
    net.(*conn).Read(0xc000014038, {0xc000166000?, 0x0?, 0x0?})
            /usr/local/go/src/net/net.go:183 +0x45 fp=0xc000121948 sp=0xc000121900 pc=0x988a05
    net/http.(*connReader).Read(0xc00007cf30, {0xc000166000, 0x1000, 0x1000})
            /usr/local/go/src/net/http/server.go:786 +0x171 fp=0xc000121998 sp=0xc000121948 pc=0xa2ead1
    bufio.(*Reader).fill(0xc00002e360)
            /usr/local/go/src/bufio/bufio.go:106 +0xff fp=0xc0001219d0 sp=0xc000121998 pc=0x9e173f
    bufio.(*Reader).Peek(0xc00002e360, 0x4)
            /usr/local/go/src/bufio/bufio.go:144 +0x5d fp=0xc0001219f0 sp=0xc0001219d0 pc=0x9e189d
    net/http.(*conn).readRequest(0xc000000aa0, {0x196b5b8, 0xc000078240})
            /usr/local/go/src/net/http/server.go:991 +0x1f8 fp=0xc000121b78 sp=0xc0001219f0 pc=0xa30018
    net/http.(*conn).serve(0xc000000aa0, {0x196b660, 0xc00007ce40})
            /usr/local/go/src/net/http/server.go:1916 +0x345 fp=0xc000121fb8 sp=0xc000121b78 pc=0xa34525
    net/http.(*Server).Serve.func3()
            /usr/local/go/src/net/http/server.go:3102 +0x2e fp=0xc000121fe0 sp=0xc000121fb8 pc=0xa391ae
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000121fe8 sp=0xc000121fe0 pc=0x863c61
    created by net/http.(*Server).Serve
            /usr/local/go/src/net/http/server.go:3102 +0x4db
    
    goroutine 648 [syscall]:
    runtime.cgocall(0xa58d50, 0xc0001d3ef0)
            /usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0001d3ec8 sp=0xc0001d3e90 pc=0x80295c
    rogchap.com/v8go._Cfunc_NewIsolate()
            _cgo_gotypes.go:732 +0x49 fp=0xc0001d3ef0 sp=0xc0001d3ec8 pc=0x8eefa9
    rogchap.com/v8go.NewIsolate()
            /root/go/pkg/mod/rogchap.com/[email protected]/isolate.go:59 +0x3c fp=0xc0001d3f28 sp=0xc0001d3ef0 pc=0x8f153c
    main/agent.New({0x0?, 0x0?}, {0xc000410660, 0x13})
            /root/distribution-game/backend/agent/agent.go:11 +0x2d fp=0xc0001d3fb0 sp=0xc0001d3f28 pc=0x8f44ad
    main.runSimulator.func3()
            /root/distribution-game/backend/main.go:67 +0x32 fp=0xc0001d3fe0 sp=0xc0001d3fb0 pc=0xa581b2
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0001d3fe8 sp=0xc0001d3fe0 pc=0x863c61
    created by main.runSimulator
            /root/distribution-game/backend/main.go:67 +0x2f4
    
    goroutine 353 [syscall]:
    runtime.cgocall(0xa58d50, 0xc0001d16f0)
            /usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0001d16c8 sp=0xc0001d1690 pc=0x80295c
    rogchap.com/v8go._Cfunc_NewIsolate()
            _cgo_gotypes.go:732 +0x49 fp=0xc0001d16f0 sp=0xc0001d16c8 pc=0x8eefa9
    rogchap.com/v8go.NewIsolate()
            /root/go/pkg/mod/rogchap.com/[email protected]/isolate.go:59 +0x3c fp=0xc0001d1728 sp=0xc0001d16f0 pc=0x8f153c
    main/agent.New({0x0?, 0x0?}, {0xc000410660, 0x13})
            /root/distribution-game/backend/agent/agent.go:11 +0x2d fp=0xc0001d17b0 sp=0xc0001d1728 pc=0x8f44ad
    main.runSimulator.func3()
            /root/distribution-game/backend/main.go:67 +0x32 fp=0xc0001d17e0 sp=0xc0001d17b0 pc=0xa581b2
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0001d17e8 sp=0xc0001d17e0 pc=0x863c61
    created by main.runSimulator
            /root/distribution-game/backend/main.go:67 +0x2f4
    
    goroutine 642 [syscall]:
    runtime.cgocall(0xa58d50, 0xc0003c36f0)
            /usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0003c36c8 sp=0xc0003c3690 pc=0x80295c
    rogchap.com/v8go._Cfunc_NewIsolate()
            _cgo_gotypes.go:732 +0x49 fp=0xc0003c36f0 sp=0xc0003c36c8 pc=0x8eefa9
    rogchap.com/v8go.NewIsolate()
            /root/go/pkg/mod/rogchap.com/[email protected]/isolate.go:59 +0x3c fp=0xc0003c3728 sp=0xc0003c36f0 pc=0x8f153c
    main/agent.New({0x19690a0?, 0xc0003c37d0?}, {0xc000410660, 0x13})
            /root/distribution-game/backend/agent/agent.go:11 +0x2d fp=0xc0003c37b0 sp=0xc0003c3728 pc=0x8f44ad
    main.runSimulator.func3()
            /root/distribution-game/backend/main.go:67 +0x32 fp=0xc0003c37e0 sp=0xc0003c37b0 pc=0xa581b2
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0003c37e8 sp=0xc0003c37e0 pc=0x863c61
    created by main.runSimulator
            /root/distribution-game/backend/main.go:67 +0x2f4
    
    goroutine 644 [syscall]:
    runtime.cgocall(0xa58d50, 0xc0001d26f0)
            /usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0001d26c8 sp=0xc0001d2690 pc=0x80295c
    rogchap.com/v8go._Cfunc_NewIsolate()
            _cgo_gotypes.go:732 +0x49 fp=0xc0001d26f0 sp=0xc0001d26c8 pc=0x8eefa9
    rogchap.com/v8go.NewIsolate()
            /root/go/pkg/mod/rogchap.com/[email protected]/isolate.go:59 +0x3c fp=0xc0001d2728 sp=0xc0001d26f0 pc=0x8f153c
    main/agent.New({0x0?, 0x0?}, {0xc000410660, 0x13})
            /root/distribution-game/backend/agent/agent.go:11 +0x2d fp=0xc0001d27b0 sp=0xc0001d2728 pc=0x8f44ad
    main.runSimulator.func3()
            /root/distribution-game/backend/main.go:67 +0x32 fp=0xc0001d27e0 sp=0xc0001d27b0 pc=0xa581b2
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0001d27e8 sp=0xc0001d27e0 pc=0x863c61
    created by main.runSimulator
            /root/distribution-game/backend/main.go:67 +0x2f4
    
    goroutine 647 [runnable]:
    runtime.cgocall(0xa598a0, 0xc0001d3690)
            /usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0001d3668 sp=0xc0001d3630 pc=0x80295c
    rogchap.com/v8go._Cfunc_NewValueUndefined(0x7fae455a76b0)
            _cgo_gotypes.go:897 +0x4d fp=0xc0001d3690 sp=0xc0001d3668 pc=0x8ef8ad
    rogchap.com/v8go.newValueUndefined.func1(0x40?)
            /root/go/pkg/mod/rogchap.com/[email protected]/value.go:42 +0x46 fp=0xc0001d36c8 sp=0xc0001d3690 pc=0x8f29e6
    rogchap.com/v8go.newValueUndefined(0x7fae455a76b0?)
            /root/go/pkg/mod/rogchap.com/[email protected]/value.go:42 +0x19 fp=0xc0001d36f0 sp=0xc0001d36c8 pc=0x8f2959
    rogchap.com/v8go.NewIsolate()
            /root/go/pkg/mod/rogchap.com/[email protected]/isolate.go:63 +0xd0 fp=0xc0001d3728 sp=0xc0001d36f0 pc=0x8f15d0
    main/agent.New({0x0?, 0x0?}, {0xc000410660, 0x13})
            /root/distribution-game/backend/agent/agent.go:11 +0x2d fp=0xc0001d37b0 sp=0xc0001d3728 pc=0x8f44ad
    main.runSimulator.func3()
            /root/distribution-game/backend/main.go:67 +0x32 fp=0xc0001d37e0 sp=0xc0001d37b0 pc=0xa581b2
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0001d37e8 sp=0xc0001d37e0 pc=0x863c61
    created by main.runSimulator
            /root/distribution-game/backend/main.go:67 +0x2f4
    
    goroutine 645 [syscall]:
    runtime.cgocall(0xa58d50, 0xc0001c9ef0)
            /usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0001c9ec8 sp=0xc0001c9e90 pc=0x80295c
    rogchap.com/v8go._Cfunc_NewIsolate()
            _cgo_gotypes.go:732 +0x49 fp=0xc0001c9ef0 sp=0xc0001c9ec8 pc=0x8eefa9
    rogchap.com/v8go.NewIsolate()
            /root/go/pkg/mod/rogchap.com/[email protected]/isolate.go:59 +0x3c fp=0xc0001c9f28 sp=0xc0001c9ef0 pc=0x8f153c
    main/agent.New({0x19690a0?, 0xc0001c9fd0?}, {0xc000410660, 0x13})
            /root/distribution-game/backend/agent/agent.go:11 +0x2d fp=0xc0001c9fb0 sp=0xc0001c9f28 pc=0x8f44ad
    main.runSimulator.func3()
            /root/distribution-game/backend/main.go:67 +0x32 fp=0xc0001c9fe0 sp=0xc0001c9fb0 pc=0xa581b2
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0001c9fe8 sp=0xc0001c9fe0 pc=0x863c61
    created by main.runSimulator
            /root/distribution-game/backend/main.go:67 +0x2f4
    
    goroutine 646 [syscall]:
    runtime.cgocall(0xa58d50, 0xc0001d2ef0)
            /usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0001d2ec8 sp=0xc0001d2e90 pc=0x80295c
    rogchap.com/v8go._Cfunc_NewIsolate()
            _cgo_gotypes.go:732 +0x49 fp=0xc0001d2ef0 sp=0xc0001d2ec8 pc=0x8eefa9
    rogchap.com/v8go.NewIsolate()
            /root/go/pkg/mod/rogchap.com/[email protected]/isolate.go:59 +0x3c fp=0xc0001d2f28 sp=0xc0001d2ef0 pc=0x8f153c
    main/agent.New({0x0?, 0x0?}, {0xc000410660, 0x13})
            /root/distribution-game/backend/agent/agent.go:11 +0x2d fp=0xc0001d2fb0 sp=0xc0001d2f28 pc=0x8f44ad
    main.runSimulator.func3()
            /root/distribution-game/backend/main.go:67 +0x32 fp=0xc0001d2fe0 sp=0xc0001d2fb0 pc=0xa581b2
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0001d2fe8 sp=0xc0001d2fe0 pc=0x863c61
    created by main.runSimulator
            /root/distribution-game/backend/main.go:67 +0x2f4
    
    goroutine 352 [syscall]:
    runtime.cgocall(0xa58d50, 0xc00043a6f0)
            /usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc00043a6c8 sp=0xc00043a690 pc=0x80295c
    rogchap.com/v8go._Cfunc_NewIsolate()
            _cgo_gotypes.go:732 +0x49 fp=0xc00043a6f0 sp=0xc00043a6c8 pc=0x8eefa9
    rogchap.com/v8go.NewIsolate()
            /root/go/pkg/mod/rogchap.com/[email protected]/isolate.go:59 +0x3c fp=0xc00043a728 sp=0xc00043a6f0 pc=0x8f153c
    main/agent.New({0x0?, 0x0?}, {0xc000410660, 0x13})
            /root/distribution-game/backend/agent/agent.go:11 +0x2d fp=0xc00043a7b0 sp=0xc00043a728 pc=0x8f44ad
    main.runSimulator.func3()
            /root/distribution-game/backend/main.go:67 +0x32 fp=0xc00043a7e0 sp=0xc00043a7b0 pc=0xa581b2
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00043a7e8 sp=0xc00043a7e0 pc=0x863c61
    created by main.runSimulator
            /root/distribution-game/backend/main.go:67 +0x2f4
    
    goroutine 351 [runnable]:
    runtime.cgocall(0xa597c0, 0xc00004f690)
            /usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc00004f668 sp=0xc00004f630 pc=0x80295c
    rogchap.com/v8go._Cfunc_NewValueNull(0x7fae2d0e7e90)
            _cgo_gotypes.go:856 +0x4d fp=0xc00004f690 sp=0xc00004f668 pc=0x8ef64d
    rogchap.com/v8go.newValueNull.func1(0x40?)
            /root/go/pkg/mod/rogchap.com/[email protected]/value.go:36 +0x46 fp=0xc00004f6c8 sp=0xc00004f690 pc=0x8f2906
    rogchap.com/v8go.newValueNull(0x7fae2d0e7e90?)
            /root/go/pkg/mod/rogchap.com/[email protected]/value.go:36 +0x19 fp=0xc00004f6f0 sp=0xc00004f6c8 pc=0x8f2879
    rogchap.com/v8go.NewIsolate()
            /root/go/pkg/mod/rogchap.com/[email protected]/isolate.go:62 +0x9c fp=0xc00004f728 sp=0xc00004f6f0 pc=0x8f159c
    main/agent.New({0x0?, 0x0?}, {0xc000410660, 0x13})
            /root/distribution-game/backend/agent/agent.go:11 +0x2d fp=0xc00004f7b0 sp=0xc00004f728 pc=0x8f44ad
    main.runSimulator.func3()
            /root/distribution-game/backend/main.go:67 +0x32 fp=0xc00004f7e0 sp=0xc00004f7b0 pc=0xa581b2
    runtime.goexit()
            /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00004f7e8 sp=0xc00004f7e0 pc=0x863c61
    created by main.runSimulator
            /root/distribution-game/backend/main.go:67 +0x2f4
    
    rax    0x3a
    rbx    0x7fae352cef60
    rcx    0x7fae95daa398
    rdx    0x1
    rdi    0x7fae3eff13c0
    rsi    0x81
    rbp    0x7fae3eff35f0
    rsp    0x7fae3eff35f0
    r8     0x3a
    r9     0x7fffffff
    r10    0x0
    r11    0x246
    r12    0x7fae352d9330
    r13    0x1
    r14    0x7fae3effbd30
    r15    0x19a1a91
    rip    0x12bfa8e
    rflags 0x202
    cs     0x33
    fs     0x0
    gs     0x0
    exit status 2
    
v8 javascript engine binding for golang

Go-V8 V8 JavaScript engine bindings for Go. Features Thread safe Thorough and careful testing Boolean, Number, String, Object, Array, Regexp, Function

Nov 21, 2022
A JavaScript interpreter in Go (golang)

otto -- import "github.com/robertkrimen/otto" Package otto is a JavaScript parser and interpreter written natively in Go. http://godoc.org/github.com/

Jan 2, 2023
A Go API for the V8 javascript engine.

V8 Bindings for Go The v8 bindings allow a user to execute javascript from within a go executable. The bindings are tested to work with several recent

Dec 15, 2022
❄️ Elsa is a minimal, fast and secure runtime for JavaScript and TypeScript written in Go

Elsa Elsa is a minimal, fast and secure runtime for JavaScript and TypeScript written in Go, leveraging the power from QuickJS. Features URL based imp

Jan 7, 2023
Go bindings to QuickJS: a fast, small, and embeddable ES2020 JavaScript interpreter.

quickjs Go bindings to QuickJS: a fast, small, and embeddable ES2020 JavaScript interpreter. These bindings are a WIP and do not match full parity wit

Dec 28, 2022
⛳ A minimal programming language inspired by Ink, JavaScript, and Python.

⛳ Golfcart My blog post: Creating the Golfcart Programming Language Getting Started Scope Rules Usage Building and tests Contributions License Golfcar

Sep 6, 2022
Execute JavaScript from Go
Execute JavaScript from Go

Execute JavaScript from Go Usage import "rogchap.com/v8go" Running a script ctx, _ := v8go.NewContext() // creates a new V8 context with a new Isolate

Jan 9, 2023
A safe way to execute functions asynchronously, recovering them in case of panic. It also provides an error stack aiming to facilitate fail causes discovery.

Async Provides a safe way to execute functions asynchronously, recovering them in case of panic. It also provides an error stack aiming to facilitate

Dec 20, 2022
A simple Cron library for go that can execute closures or functions at varying intervals, from once a second to once a year on a specific date and time. Primarily for web applications and long running daemons.

Cron.go This is a simple library to handle scheduled tasks. Tasks can be run in a minimum delay of once a second--for which Cron isn't actually design

Dec 17, 2022
Go Library to Execute Commands Over SSH at Scale
Go Library to Execute Commands Over SSH at Scale

vSSH Go library to handle tens of thousands SSH connections and execute the command(s) with higher-level API for building network device / server auto

Dec 9, 2022
Command-line tool to remotely execute commands on Windows machines through WinRM

winrm-cli This is a Go command-line executable to execute remote commands on Windows machines through the use of WinRM/WinRS. Note: this tool doesn't

Dec 15, 2022
A simple Cron library for go that can execute closures or functions at varying intervals, from once a second to once a year on a specific date and time. Primarily for web applications and long running daemons.

Cron.go This is a simple library to handle scheduled tasks. Tasks can be run in a minimum delay of once a second--for which Cron isn't actually design

Dec 17, 2022
Golang evasion tool, execute-assembly .Net file

?? Frog For Automatic Scan ?? Doge For Defense Evasion&Offensive Security Doge-Assembly Golang evasion tool, execute-assembly .Net file Intro Are you

Jan 8, 2023
🤘 The native golang ssh client to execute your commands over ssh connection. 🚀🚀
🤘 The native golang ssh client to execute your commands over ssh connection. 🚀🚀

Golang SSH Client. Fast and easy golang ssh client module. Goph is a lightweight Go SSH client focusing on simplicity! Installation ❘ Features ❘ Usage

Dec 24, 2022
Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.

Cadence Visit cadenceworkflow.io to learn about Cadence. This repo contains the source code of the Cadence server. To implement workflows, activities

Jan 9, 2023
Go Library to Execute Commands Over SSH at Scale
Go Library to Execute Commands Over SSH at Scale

Go library to handle tens of thousands SSH connections and execute the command(s) with higher-level API for building network device / server automation.

Dec 9, 2022
CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.
CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.

trdsql CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. It is a tool like q, textql and others. The difference from these tools is t

Jan 1, 2023
Simple pgx wrapper to execute and scan query results

pig Simple pgx wrapper to execute and scan query results. Features All-in-one tool; Simple transactions management: You can set idle_in_transaction_se

Dec 5, 2022
this is an api that execute your deno code and send you the output

this a simple api that execute your deno code and send you the output, has not limit per request example request: in deno: const rawResponse = await f

Dec 23, 2022