Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions transport-interop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ RUST_SUBDIRS := $(wildcard impl/rust/*/.)
NIM_SUBDIRS := $(wildcard impl/nim/*/.)
ZIG_SUBDIRS := $(wildcard impl/zig/*/.)
JAVA_SUBDIRS := $(wildcard impl/java/*/.)
C_SUBDIRS := $(wildcard impl/c/*/.)

all: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JAVA_SUBDIRS)
all: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JAVA_SUBDIRS) $(C_SUBDIRS)
$(JS_SUBDIRS):
$(MAKE) -C $@
$(GO_SUBDIRS):
Expand All @@ -18,5 +19,7 @@ $(ZIG_SUBDIRS):
$(MAKE) -C $@
$(JAVA_SUBDIRS):
$(MAKE) -C $@
$(C_SUBDIRS):
$(MAKE) -C $@

.PHONY: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JAVA_SUBDIRS) all
.PHONY: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) $(JAVA_SUBDIRS) $(C_SUBDIRS) all
4 changes: 4 additions & 0 deletions transport-interop/impl/c/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
c-libp2p-*.zip
c-libp2p-*
c-libp2p-*/*
image.json
26 changes: 26 additions & 0 deletions transport-interop/impl/c/v0.0.1/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
image_name := c-v0.0.1
commitSha := 9ee22b6a2272ffa5cecbce2af61d4bda8b7a1b21
zip_name := c-libp2p-$(commitSha).zip
dir_name := c-libp2p-$(commitSha)

all: image.json

image.json:
wget -O $(zip_name) https://github.com/Pier-Two/c-libp2p/archive/$(commitSha).zip && unzip -o $(zip_name)
cd $(dir_name) && \
mkdir -p lib/secp256k1 && wget -O secp256k1.zip https://github.com/bitcoin-core/secp256k1/archive/master.zip && unzip -o secp256k1.zip && mv secp256k1-master/* lib/secp256k1/ && rm -rf secp256k1.zip secp256k1-master && \
mkdir -p lib/libtomcrypt && wget -O libtomcrypt.zip https://github.com/libtom/libtomcrypt/archive/develop.zip && unzip -o libtomcrypt.zip && mv libtomcrypt-develop/* lib/libtomcrypt/ && rm -rf libtomcrypt.zip libtomcrypt-develop && \
mkdir -p lib/libtommath && wget -O libtommath.zip https://github.com/libtom/libtommath/archive/master.zip && unzip -o libtommath.zip && mv libtommath-master/* lib/libtommath/ && rm -rf libtommath.zip libtommath-master && \
mkdir -p lib/libeddsa && wget -O libeddsa.zip https://github.com/phlay/libeddsa/archive/master.zip && unzip -o libeddsa.zip && mv libeddsa-master/* lib/libeddsa/ && rm -rf libeddsa.zip libeddsa-master && \
mkdir -p lib/noise-c && wget -O noise-c.zip https://github.com/uink45/noise-c/archive/master.zip && unzip -o noise-c.zip && mv noise-c-master/* lib/noise-c/ && rm -rf noise-c.zip noise-c-master && \
mkdir -p lib/wjcryptlib && wget -O wjcryptlib.zip https://github.com/WaterJuice/WjCryptLib/archive/master.zip && unzip -o wjcryptlib.zip && mv WjCryptLib-master/* lib/wjcryptlib/ && rm -rf wjcryptlib.zip WjCryptLib-master && \
mkdir -p lib/sha3 && wget -O sha3.zip https://github.com/pablotron/sha3/archive/main.zip && unzip -o sha3.zip && mv sha3-main/* lib/sha3/ && rm -rf sha3.zip sha3-main && \
mkdir -p lib/c20p1305 && wget -O c20p1305.zip https://github.com/wg/c20p1305/archive/master.zip && unzip -o c20p1305.zip && mv c20p1305-master/* lib/c20p1305/ && rm -rf c20p1305.zip c20p1305-master
cd $(dir_name) && IMAGE_NAME=$(image_name) ../../../../dockerBuildWrapper.sh -f interop-tests/Dockerfile .
docker image inspect $(image_name) -f '{{.Id}}' | \
xargs -I {} echo '{"imageID": "{}"}' > $@

clean:
rm -rf image.json $(dir_name) $(zip_name)

.PHONY: all clean
7 changes: 4 additions & 3 deletions transport-interop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions transport-interop/versionsInput.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,5 +349,18 @@
"muxers": [
"yamux"
]
},
{
"id": "c-v0.0.1",
"transports": [
"tcp"
],
"secureChannels": [
"noise"
],
"muxers": [
"mplex",
"yamux"
]
}
]