1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-27 07:40:59 +00:00

build(core): switch to nightly Rust

This commit is contained in:
matejcik 2022-08-18 13:16:53 +02:00 committed by matejcik
parent f253d7e591
commit 612d52e298
2 changed files with 9 additions and 10 deletions

View File

@ -3,7 +3,7 @@
}: }:
let let
# the last commit from master as of 2022-02-08 # the last commit from master as of 2022-08-02
rustOverlay = import (builtins.fetchTarball { rustOverlay = import (builtins.fetchTarball {
url = "https://github.com/oxalica/rust-overlay/archive/b38c1683594aeefa5c3c4dde115401f059146be6.tar.gz"; url = "https://github.com/oxalica/rust-overlay/archive/b38c1683594aeefa5c3c4dde115401f059146be6.tar.gz";
sha256 = "0rk4i42cys2v7k2ir57x5qa8dc37nrs432cdpbr4cddskgvyi8ky"; sha256 = "0rk4i42cys2v7k2ir57x5qa8dc37nrs432cdpbr4cddskgvyi8ky";
@ -29,15 +29,15 @@ let
chmod -w $out chmod -w $out
''; '';
# NOTE: don't forget to update Minimum Supported Rust Version in docs/core/build/emulator.md # NOTE: don't forget to update Minimum Supported Rust Version in docs/core/build/emulator.md
rustProfiles = nixpkgs.rust-bin.stable."1.63.0"; rustProfiles = nixpkgs.rust-bin.nightly."2022-08-02";
rustStable = rustProfiles.minimal.override { rustNightly = rustProfiles.minimal.override {
targets = [ targets = [
"thumbv7em-none-eabihf" # TT "thumbv7em-none-eabihf" # TT
"thumbv7m-none-eabi" # T1 "thumbv7m-none-eabi" # T1
]; ];
# we use rustfmt from nixpkgs because it's built with the nighly flag needed for wrap_comments # we use rustfmt from nixpkgs because it's built with the nighly flag needed for wrap_comments
# to use official binary, remove rustfmt from buildInputs and add it to extensions: # to use official binary, remove rustfmt from buildInputs and add it to extensions:
extensions = [ "clippy" ]; extensions = [ "clippy" "rustfmt" ];
}; };
llvmPackages = nixpkgs.llvmPackages_13; llvmPackages = nixpkgs.llvmPackages_13;
# see pyright/README.md for update procedure # see pyright/README.md for update procedure
@ -88,8 +88,7 @@ stdenvNoCC.mkDerivation ({
poetry poetry
protobuf protobuf
pyright pyright
rustfmt rustNightly
rustStable
wget wget
zlib zlib
moreutils moreutils

View File

@ -54,12 +54,12 @@ brew install scons sdl2 sdl2_image pkg-config llvm
## Rust ## Rust
You will require Rust and Cargo. The currently supported version is 1.58 stable. You will require Rust and Cargo. The currently supported version is 1.64 nightly. The
The recommended way to install both is with [`rustup`](https://rustup.rs/). If you recommended way to install both is with [`rustup`](https://rustup.rs/). Make sure you
are installing `rustup` for the first time, the stable toolchain will be installed are up to date:
for you automatically. Otherwise, make sure you are up to date:
```sh ```sh
rustup default nightly
rustup update rustup update
``` ```