zen-eth/eth-p2p-z
Ethereum p2p implementation in Zig
fe9928d11540b723aa131fe097c2c4b5359bb0731359ac3ab12a6af173c2b7f13ae9c4f5ff34e11efccfe2659f24497199d86404e0ef7dbc79e033d259bee4ce57e35dab8c28415d4a5dfb2c26089c849f3329b05b3e98da928fe9988d74971da70328b4b96922b375a601f3303bf43be1dceb3d101df6c6Zig implementation of the Ethereum peer-to-peer stack, built on top of the libp2p architecture.
Note: This project is pre-release software. Expect rapid iteration and frequent breaking API changes while we carve out the Ethereum-focused feature set.
If you are looking for a general-purpose libp2p implementation with multiple transports and protocol stacks, this project is not a drop-in replacement.
To build the project, run the following command in the root directory of the project:
zig build -Doptimize=ReleaseSafe
To run the tests, run the following command in the root directory of the project:
zig build test --summary all
Update build.zig.zon:
zig fetch --save git+https://github.com/zen-eth/zig-libp2p.git
In your build.zig:
const libp2p_dep = b.dependency("libp2p", .{
.target = target,
.optimize = optimize,
});
const libp2p_module = libp2p_dep.module("zig-libp2p");
root_module.addImport("libp2p", libp2p_module);