简体   繁体   中英

Rust Backtrace on windows?

I am trying to run my project https:\/\/github.com\/comit-network\/create-comit-app\/<\/a> (master branch) on windows (I usually code on unix systems).

C:/Users/dante/.cargo/bin/cargo.exe run --color=always --package create-comit-app --bin create-comit-app --no-default-features -- start-env
   Compiling create-comit-app v0.5.0 (C:\Users\dante\src\create-comit-app)
    Finished dev [unoptimized + debuginfo] target(s) in 25.36s
     Running `target\debug\create-comit-app.exe start-env`
Panic received, cleaning up...Panic received, cleaning up...thread panicked while processing panic. aborting.
error: process didn't exit successfully: `target\debug\create-comit-app.exe start-env` (exit code: 0xc000001d, STATUS_ILLEGAL_INSTRUCTION)

Process finished with exit code -1073741795 (0xC000001D)

When using cmd , it's

set RUST_BACKTRACE=1
set RUST_BACKTRACE=full

when using powershell , it's

$env:RUST_BACKTRACE=1
$env:RUST_BACKTRACE="full"

eg

$env:RUST_BACKTRACE=1; cargo run

How do I run 'cargo test' with RUST_BACKTRACE=1 on Windows?

about Environment Variables - PowerShell | Microsoft Docs

set - cmd | Microsoft Docs

Thank you for those attempting to help.

A colleague of mine was able to tackle down the panic issues.

Regarding backtrace, it was solved by changing the toolchain to ...-windows-gnu

这在 Windows 上运行良好 -

$env:RUST_BACKTRACE=1; cargo run

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM