mirror of
https://github.com/vacp2p/nim-waku-go-wrapper.git
synced 2026-01-08 04:44:06 -05:00
Spawn separate process for wakunode2 from Go
Hack to get librln dynamic lib
This commit is contained in:
14
main.go
14
main.go
@@ -3,8 +3,11 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"encoding/json"
|
||||
"bytes"
|
||||
"os"
|
||||
"os/exec"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -28,6 +31,17 @@ type DebugResult struct {
|
||||
}
|
||||
|
||||
func main() {
|
||||
cmd := exec.Command("./wakunode2")
|
||||
// TODO Redirect to file
|
||||
cmd.Stdout = os.Stdout
|
||||
err := cmd.Start()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
log.Printf("Just ran subprocess %d, exiting\n", cmd.Process.Pid)
|
||||
|
||||
// TODO This should wait a bit
|
||||
// Run this in background
|
||||
fmt.Println("JSON RPC request: get_waku_v2_debug_v1_info")
|
||||
|
||||
data := Payload{
|
||||
|
||||
BIN
vendor/rln/target/debug/librln.so
vendored
Executable file
BIN
vendor/rln/target/debug/librln.so
vendored
Executable file
Binary file not shown.
Reference in New Issue
Block a user