Bring back zig-libp2p (#174)
* Revert "Revert "Bring back zig-libp2p (#172)" (#173)"
This reverts commit e4e9f985f7
.
* Update zig-libp2p
This commit is contained in:
parent
48400e3208
commit
df742523d4
|
@ -2,8 +2,9 @@ GO_SUBDIRS := $(wildcard impl/go/*/.)
|
||||||
JS_SUBDIRS := $(wildcard impl/js/*/.)
|
JS_SUBDIRS := $(wildcard impl/js/*/.)
|
||||||
RUST_SUBDIRS := $(wildcard impl/rust/*/.)
|
RUST_SUBDIRS := $(wildcard impl/rust/*/.)
|
||||||
NIM_SUBDIRS := $(wildcard impl/nim/*/.)
|
NIM_SUBDIRS := $(wildcard impl/nim/*/.)
|
||||||
|
ZIG_SUBDIRS := $(wildcard impl/zig/*/.)
|
||||||
|
|
||||||
all: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS)
|
all: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS)
|
||||||
$(JS_SUBDIRS):
|
$(JS_SUBDIRS):
|
||||||
$(MAKE) -C $@
|
$(MAKE) -C $@
|
||||||
$(GO_SUBDIRS):
|
$(GO_SUBDIRS):
|
||||||
|
@ -12,6 +13,8 @@ $(RUST_SUBDIRS):
|
||||||
$(MAKE) -C $@
|
$(MAKE) -C $@
|
||||||
$(NIM_SUBDIRS):
|
$(NIM_SUBDIRS):
|
||||||
$(MAKE) -C $@
|
$(MAKE) -C $@
|
||||||
|
$(ZIG_SUBDIRS):
|
||||||
|
$(MAKE) -C $@
|
||||||
|
|
||||||
|
|
||||||
.PHONY: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) all
|
.PHONY: $(GO_SUBDIRS) $(JS_SUBDIRS) $(RUST_SUBDIRS) $(NIM_SUBDIRS) $(ZIG_SUBDIRS) all
|
||||||
|
|
|
@ -106,10 +106,10 @@ switch (modeStr) {
|
||||||
console.log("Building any remaining things from image.json")
|
console.log("Building any remaining things from image.json")
|
||||||
// We're building using -o image.json. This tells make to
|
// We're building using -o image.json. This tells make to
|
||||||
// not bother building image.json or anything it depends on.
|
// not bother building image.json or anything it depends on.
|
||||||
child_process.execSync(`make -o image.json`, { cwd: implFolder })
|
child_process.execSync(`make -o image.json`, { cwd: implFolder, stdio: 'inherit' })
|
||||||
} else {
|
} else {
|
||||||
console.log("No cache, building from scratch")
|
console.log("No cache, building from scratch")
|
||||||
child_process.execSync(`make`, { cwd: implFolder })
|
child_process.execSync(`make`, { cwd: implFolder, stdio: "inherit" })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
zig-libp2p-*
|
|
@ -0,0 +1,19 @@
|
||||||
|
image_name := zig-v0.0.1
|
||||||
|
commitSha := 7d8949158767de1145e9cdb2c6bf93588413da90
|
||||||
|
|
||||||
|
all: image.json print-cpu-info
|
||||||
|
|
||||||
|
print-cpu-info: image.json
|
||||||
|
docker run --rm --entrypoint /app/zig/bin/zig $$(jq -r .imageID image.json) build-exe --show-builtin
|
||||||
|
|
||||||
|
image.json:
|
||||||
|
wget -O zig-libp2p-${commitSha}.zip "https://github.com/marcopolo/zig-libp2p/archive/${commitSha}.zip"
|
||||||
|
unzip -o zig-libp2p-${commitSha}.zip
|
||||||
|
cd zig-libp2p-${commitSha} && docker build -t ${image_name} -f interop/Dockerfile .
|
||||||
|
docker image inspect ${image_name} -f "{{.Id}}" | \
|
||||||
|
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf image.json zig-libp2p-*.zip zig-libp2p-*
|
||||||
|
|
||||||
|
.PHONY: all clean print-cpu-info
|
|
@ -11,6 +11,7 @@ import jsV042 from "./impl/js/v0.42/node-image.json"
|
||||||
import nimv10 from "./impl/nim/v1.0/image.json"
|
import nimv10 from "./impl/nim/v1.0/image.json"
|
||||||
import chromiumJsV041 from "./impl/js/v0.41/chromium-image.json"
|
import chromiumJsV041 from "./impl/js/v0.41/chromium-image.json"
|
||||||
import chromiumJsV042 from "./impl/js/v0.42/chromium-image.json"
|
import chromiumJsV042 from "./impl/js/v0.42/chromium-image.json"
|
||||||
|
import zigv001 from "./impl/zig/v0.0.1/image.json"
|
||||||
|
|
||||||
export type Version = {
|
export type Version = {
|
||||||
id: string,
|
id: string,
|
||||||
|
@ -114,4 +115,11 @@ export const versions: Array<Version> = [
|
||||||
secureChannels: ["noise"],
|
secureChannels: ["noise"],
|
||||||
muxers: ["mplex", "yamux"],
|
muxers: ["mplex", "yamux"],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "zig-v0.0.1",
|
||||||
|
containerImageID: zigv001.imageID,
|
||||||
|
transports: ["quic-v1"],
|
||||||
|
secureChannels: [],
|
||||||
|
muxers: [],
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue