Skip to content

Cargo env vars aren't set #1515

Closed
Closed
@alecmocatta

Description

@alecmocatta

Cargo's docs specify various env vars that are passed to binaries run with cargo run/test/bench. cargo miri does not currently pass them, so this fails under miri:

fn main() {
    println!("{}", std::env::var("CARGO_PKG_NAME").unwrap());
}

(Playground)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions