Skip to content

如何使用 GitHub Codespaces 在线开发环境? #4

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

You must be logged in to vote

GitHub 为每位用户提供了免费的 Codespaces 使用额度,你可以通过下面的链接在线上环境打开模板合约

它已经包含了 gear 的节点二进制和构建智能合约所需的依赖,机器配置推荐选择 4 核,编译速度更快

环境创建需要一定时间初始化,大概 1 分钟

初始化完成后,可以像使用本地环境一样使用 cargo build --release 编译合约

如果想在此环境中打开你自己的仓库,可以将此 .devcontainer.json 文件保存到你的仓库根目录下,然后在 https://github.com/codespaces/new 页面选中自己的仓库并打开

Replies: 1 comment 2 replies

Comment options

varabot
Jul 2, 2024
Maintainer Author

You must be logged in to vote
2 replies
@lifengstone
Comment options

@varabot
Comment options

varabot Jul 7, 2024
Maintainer Author

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
2 participants