Skip to content

如何从源码编译 gear 节点二进制? #1

Answered by varabot
varabot asked this question in Q&A
Discussion options

You must be logged in to vote

在 Linux 上可以参考 https://wiki.gear-tech.io/docs/node/setting-up#compile-gear-node-by-yourself 安装所需的依赖

其他平台可以使用 Docker 编译, 流程可参考 https://github.com/gear-tech/builds/blob/master/.github/workflows/nightly.yml

克隆 https://github.com/gear-tech/gear.git 仓库后,在此目录下执行

cargo build -p gear-cli --release

这种方式编译的二进制默认不含 gcli 子命令,如果需要启用该命令,需要启用 cli feature

可以参考官方二进制 https://get.gear.rs/ 通过如下方式构建

cargo build -p gear-cli -F cli --profile production

Replies: 1 comment

Comment options

varabot
Jul 2, 2024
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by varabot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant