-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update Rust version #1739
Open
matthiasgoergens
wants to merge
9
commits into
main
Choose a base branch
from
matthias/update-rust
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update Rust version #1739
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
34097b8
Foo
matthiasgoergens 909e728
Snapshot
matthiasgoergens 990335b
Fix lint
matthiasgoergens 8c1b015
Merge remote-tracking branch 'origin/main' into matthias/update-rust
matthiasgoergens ba9a405
Restoer
matthiasgoergens 7e8eb03
Foo
matthiasgoergens af47a9e
Clippy
matthiasgoergens f923436
fmt
matthiasgoergens a6a6fbc
Linter
matthiasgoergens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,35 +47,28 @@ const CRATES: &[Crate] = &[ | |
const CARGO_MANIFEST_DIR: &str = env!("CARGO_MANIFEST_DIR"); | ||
|
||
fn build_elf(dest: &mut File, crate_path: &str, elf_path: &str, glob_name: &str, uses_std: bool) { | ||
// Use a dummy array for clippy, since not building the elf is faster than | ||
// building the elf | ||
if cfg!(feature = "cargo-clippy") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Daniel-Aaron-Bloom The new version's linter doesn't like this. Do you know whether this ever worked (and perhaps how to repair it)? |
||
writeln!(dest, r#"pub const {glob_name}: &[u8] = &[];"#) | ||
let args = if uses_std { | ||
vec!["build", "--release", "--features=std"] | ||
} else { | ||
let args = if uses_std { | ||
vec!["build", "--release", "--features=std"] | ||
} else { | ||
vec!["build", "--release"] | ||
}; | ||
let output = Command::new("cargo") | ||
.args(args) | ||
.current_dir(crate_path) | ||
.env_clear() | ||
.envs(std::env::vars().filter(|x| !x.0.starts_with("CARGO_"))) | ||
.output() | ||
.expect("cargo command failed to run"); | ||
if !output.status.success() { | ||
io::stdout().write_all(&output.stdout).unwrap(); | ||
io::stderr().write_all(&output.stderr).unwrap(); | ||
panic!("cargo build {crate_path} failed."); | ||
} | ||
writeln!( | ||
dest, | ||
r#"pub const {glob_name}: &[u8] = | ||
include_bytes!(r"{CARGO_MANIFEST_DIR}/{elf_path}");"# | ||
) | ||
vec!["build", "--release"] | ||
}; | ||
let output = Command::new("cargo") | ||
.args(args) | ||
.current_dir(crate_path) | ||
.env_clear() | ||
.envs(std::env::vars().filter(|x| !x.0.starts_with("CARGO_"))) | ||
.output() | ||
.expect("cargo command failed to run"); | ||
if !output.status.success() { | ||
io::stdout().write_all(&output.stdout).unwrap(); | ||
io::stderr().write_all(&output.stderr).unwrap(); | ||
panic!("cargo build {crate_path} failed."); | ||
} | ||
.expect("failed to write vars.rs"); | ||
writeln!( | ||
dest, | ||
r#"pub const {glob_name}: &[u8] = | ||
include_bytes!(r"{CARGO_MANIFEST_DIR}/{elf_path}");"# | ||
).expect("failed to write vars.rs"); | ||
|
||
println!("cargo:rerun-if-changed={crate_path}"); | ||
println!("cargo:rerun-if-changed={elf_path}"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[toolchain] | ||
channel = "nightly-2024-04-24" | ||
channel = "nightly-2024-05-27" | ||
components = ["rustfmt", "rust-src", "clippy"] | ||
profile = "minimal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether token, tokenbin, wallet and walletbin should all be here, or whether we forget cleaning them up in recent renames?
@supragya You recently did some renames / cleanups here. Do you have an opinion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those should be needed for testing I hope?