mirror of
https://github.com/logos-messaging/logos-messaging-go-bindings.git
synced 2026-01-02 05:53:07 +00:00
chore: update repo
This commit is contained in:
parent
1b1330eaf9
commit
6709d9b64d
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
||||
[submodule "third_party/logos-messaging-nim"]
|
||||
path = third_party/logos-messaging-nim
|
||||
url = https://github.com/logos-co/logos-messaging-nim.git
|
||||
url = https://github.com/logos-messaging/logos-messaging-nim
|
||||
|
||||
16
README.md
16
README.md
@ -5,7 +5,7 @@ Go bindings for the Logos Messaging library.
|
||||
## Install
|
||||
|
||||
```
|
||||
go get -u github.com/logos-co/logos-messaging-go-bindings
|
||||
go get -u github.com/logos-messaging/logos-messaging-go-bindings
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
@ -13,21 +13,21 @@ go get -u github.com/logos-co/logos-messaging-go-bindings
|
||||
This repository doesn't download or build `logos-messaging-nim`. You must provide `libwaku` and its headers.
|
||||
|
||||
To do so, you can:
|
||||
- Build `libwaku` from https://github.com/logos-co/logos-messaging-nim.
|
||||
- Build `libwaku` from https://github.com/logos-messaging/logos-messaging-nim.
|
||||
- Point `cgo` to the headers and compiled library when building your project.
|
||||
|
||||
Example environment setup (adjust paths to your logos-messaging-nim checkout):
|
||||
```
|
||||
export LOGOS_MESSAGING_NIM_DIR=/path/to/logos-messaging-nim
|
||||
export CGO_CFLAGS="-I${LOGOS_MESSAGING_NIM_DIR}/library"
|
||||
export CGO_LDFLAGS="-L${LOGOS_MESSAGING_NIM_DIR}/build -lwaku -Wl,-rpath,${LOGOS_MESSAGING_NIM_DIR}/build"
|
||||
export LMN_DIR=/path/to/logos-messaging-nim
|
||||
export CGO_CFLAGS="-I${LMN_DIR}/library"
|
||||
export CGO_LDFLAGS="-L${LMN_DIR}/build -lwaku -Wl,-rpath,${LMN_DIR}/build"
|
||||
```
|
||||
|
||||
Such setup would look like this in a `Makefile`:
|
||||
```Makefile
|
||||
LOGOS_MESSAGING_NIM_DIR ?= /path/to/logos-messaging-nim
|
||||
CGO_CFLAGS = -I$(LOGOS_MESSAGING_NIM_DIR)/library
|
||||
CGO_LDFLAGS = -L$(LOGOS_MESSAGING_NIM_DIR)/build -lwaku -Wl,-rpath,$(LOGOS_MESSAGING_NIM_DIR)/build
|
||||
LMN_DIR ?= /path/to/logos-messaging-nim
|
||||
CGO_CFLAGS = -I$(LMN_DIR)/library
|
||||
CGO_LDFLAGS = -L$(LMN_DIR)/build -lwaku -Wl,-rpath,$(LMN_DIR)/build
|
||||
|
||||
build: ## Your project build command
|
||||
go build ./...
|
||||
|
||||
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module github.com/logos-co/logos-messaging-go-bindings
|
||||
module github.com/logos-messaging/logos-messaging-go-bindings
|
||||
|
||||
go 1.21
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/logos-co/logos-messaging-go-bindings/utils"
|
||||
"github.com/logos-messaging/logos-messaging-go-bindings/utils"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
# Directories
|
||||
THIRD_PARTY_DIR := $(shell pwd)/../third_party
|
||||
LOGOS_MESSAGING_NIM_REPO := https://github.com/logos-co/logos-messaging-nim
|
||||
LOGOS_MESSAGING_NIM_DIR := $(THIRD_PARTY_DIR)/logos-messaging-nim
|
||||
LMN_REPO := https://github.com/logos-messaging/logos-messaging-nim
|
||||
LMN_DIR := $(THIRD_PARTY_DIR)/logos-messaging-nim
|
||||
|
||||
.PHONY: all clean build-libwaku build
|
||||
|
||||
@ -13,12 +13,12 @@ all: build
|
||||
# Build libwaku
|
||||
build-libwaku:
|
||||
@echo "Building libwaku..."
|
||||
@cd $(LOGOS_MESSAGING_NIM_DIR) && make libwaku
|
||||
@cd $(LMN_DIR) && make libwaku
|
||||
|
||||
# Build Logos Messaging Go Bindings
|
||||
|
||||
build: export CGO_CFLAGS = "-I${LOGOS_MESSAGING_NIM_DIR}/library/"
|
||||
build: export CGO_LDFLAGS = "-L${LOGOS_MESSAGING_NIM_DIR}/build/ -lwaku -L${LOGOS_MESSAGING_NIM_DIR} -Wl,-rpath,${LOGOS_MESSAGING_NIM_DIR}/build/"
|
||||
build: export CGO_CFLAGS = "-I${LMN_DIR}/library/"
|
||||
build: export CGO_LDFLAGS = "-L${LMN_DIR}/build/ -lwaku -L${LMN_DIR} -Wl,-rpath,${LMN_DIR}/build/"
|
||||
build:
|
||||
@echo "Building Logos Messaging Go Bindings..."
|
||||
go build ./...
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/logos-co/logos-messaging-go-bindings/waku/common"
|
||||
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||
)
|
||||
|
||||
func TestBasicWakuNodes(t *testing.T) {
|
||||
@ -29,7 +29,7 @@ func TestBasicWakuNodes(t *testing.T) {
|
||||
Debug("TestBasicWakuNodes completed successfully")
|
||||
}
|
||||
|
||||
/* artifact https://github.com/logos-co/logos-messaging-go-bindings/issues/40 */
|
||||
/* artifact https://github.com/logos-messaging/logos-messaging-go-bindings/issues/40 */
|
||||
func TestNodeRestart(t *testing.T) {
|
||||
t.Skip("Skipping test for open artifact ")
|
||||
Debug("Starting TestNodeRestart")
|
||||
|
||||
@ -346,7 +346,7 @@ import (
|
||||
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
||||
"github.com/waku-org/go-waku/waku/v2/utils"
|
||||
|
||||
"github.com/logos-co/logos-messaging-go-bindings/waku/common"
|
||||
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||
)
|
||||
|
||||
const requestTimeout = 30 * time.Second
|
||||
|
||||
@ -17,8 +17,8 @@ import (
|
||||
"github.com/cenkalti/backoff/v3"
|
||||
"github.com/libp2p/go-libp2p/core/peer"
|
||||
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
||||
"github.com/logos-co/logos-messaging-go-bindings/utils"
|
||||
"github.com/logos-co/logos-messaging-go-bindings/waku/common"
|
||||
"github.com/logos-messaging/logos-messaging-go-bindings/utils"
|
||||
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/logos-co/logos-messaging-go-bindings/waku/common"
|
||||
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||
)
|
||||
|
||||
// Test node connect & disconnect peers
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"github.com/cenkalti/backoff/v3"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
||||
"github.com/logos-co/logos-messaging-go-bindings/waku/common"
|
||||
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
||||
|
||||
"github.com/logos-co/logos-messaging-go-bindings/waku/common"
|
||||
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/logos-co/logos-messaging-go-bindings/waku/common"
|
||||
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||
|
||||
// "go.uber.org/zap/zapcore"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/logos-co/logos-messaging-go-bindings/waku/common"
|
||||
"github.com/logos-messaging/logos-messaging-go-bindings/waku/common"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user