Skip to content

Re-audit build-script env against current cargo #33

Description

@jackmarsh

please_rust reproduces cargo's build-script environment: CARGO_PKG_*, OUT_DIR, CARGO_CFG_* derived from the target's cfgs, CARGO_CRATE_NAME, CARGO_BIN_NAME, CARGO_MANIFEST_DIR, CARGO_MANIFEST_LINKS, feature cfgs, and the directive protocol back out of it including error=, rustc-flags, rustc-link-lib and rustc-cfg.

That was audited against cargo's documentation in August 2026, and the audit caught real gaps: error=, rustc-flags, CARGO_CRATE_NAME among them.

Cargo keeps moving. Each release can add a variable or a directive, and a build script that reads one we do not set gets an empty string rather than an error, which is the quiet kind of wrong.

Recurring, not one-off

This is a task to redo when cargo versions land rather than something to close. Worth a checklist in the repo listing what was audited and against which cargo version, so the next pass is a diff rather than a re-read.

How you would know

A recorded audit date and cargo version, and the diff since the last one.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5Bounded and mechanical, no urgencyevidenceMeasurement, corpora and differential testingwhere:corpusTry it in rust-corpus and see if it breaks where expected

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions