Home Explore Blog CI



6af974c2c452b28220cc71eff91905eccb6a0f61d0fd92090000000200034cfa.png

Extracted Text
rust-analyzer main.rs ← → xtask/src/main.rs > fn main 32 sh.change_dir(project_root()); 33 34 match flags.subcommand { 35 flags::XtaskCmd::Install(cmd) => cmd.run(sh), 36 flags::XtaskCmd:: FuzzTests(_) => run_fuzzer(sh), 37 flags::XtaskCmd:: Release(cmd) => cmd.run(sh), 38 flags::XtaskCmd::Promote(cmd) => cmd.run(sh), 39 flags::XtaskCmd::Dist(cmd) => cmd.run(sh), 40 flags::XtaskCmd::PublishReleaseNotes(cmd) => cmd.run(sh), 41 flags::XtaskCmd::Metrics(cmd) => cmd.run(sh), 42 flags::XtaskCmd::Bb(cmd) => { 43 { 44 let_d = sh.push_dir("./crates/rust-analyzer"); 45 cmd! (sh, "cargo build --release--features jemalloc").run()?; 46 } 47 sh.copy_file( 48 "./target/release/rust-analyzer", 49 format!("./target/rust-analyzer-{}", cmd.suffix), 50 )?; 51 0k(()) 52 } 53 } Checking for updates to Python language server... 40,24 (48 selected) Rust +
Explanation
This image shows a code snippet from a Rust project, specifically within the `xtask/src/main.rs` file. The code appears to be related to building and releasing a `rust-analyzer` project. It includes handling different subcommands via a `match` statement on `flags.subcommand`, and uses shell commands to build the project with specific features. The code also handles copying files and formatting strings, likely to prepare the project for release.