Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add toolchain file + update build docs #1557

Closed
wants to merge 2 commits into from
Closed
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
22 changes: 2 additions & 20 deletions docs/dev-guide/src/getting-started/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,14 @@ develop natively on Windows, [however that is unsupported](https://github.com/gl
You'll need a working Rust installation, if you don't have one already available (NOTE: you'll want to install and manage your Rust toolchain with `rustup`,
not by installing your distro's `rust` package which will most likely be too old).

For the installation you can refer to [these instructions](https://www.rust-lang.org/tools/install).

Once you have a working rust installation, you'll need to add the `wasm32-unknown-unknown` target and install the nightly toolchain

```bash
rustup update
rustup toolchain install nightly
rustup target add wasm32-unknown-unknown --nightly
```

Note: So that you don't have to specify the toolchain every build, you can set `nightly` as your default toolchain while working on creditcoin.

You can also check
[./ci/env](https://github.com/gluwa/creditcoin/blob/dev/ci/env)
for the toolchain being used in our CI in case you run into issues with newer version before we notice them.

```bash
# set nightly as default for your creditcoin checkout
rustup override set nightly
```
See [rust installation guide](https://www.rust-lang.org/tools/install)

### System build dependencies

You'll need a few system dependencies (some extra dependencies may be required depending on the platform, but
all platforms require the following):

- Gcc12
- Clang
- Protobuf compiler
- CMake
Expand Down
14 changes: 14 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[toolchain]
channel = "nightly-2023-06-08"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes ci/env redundant.

However you need to manually parse this new file for all CI workflows where ci/env is used b/c the GitHub actions don't support it, see
gluwa/creditcoin3@c7f17ec

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I didn't know that. In that case we can actually close this PR

components = [
"cargo",
"clippy",
"rust-analyzer",
"rust-src",
"rust-std",
"rustc-dev",
"rustc",
"rustfmt",
]
targets = ["wasm32-unknown-unknown", "wasm32-wasi"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: what is the wasm32-wasi target? I've not seen it before.

profile = "minimal"
Loading