Open Bug 1329700 Opened 7 years ago Updated 2 years ago

mozbuild: generate default bin names for RUST_PROGRAMS

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: rillian, Unassigned)

References

Details

We support building exectuables written in rust with the RUST_PROGRAMS key in moz.build files. This must define an executable, and we verify that the same executable is defined by the Cargo.toml in the same directory.

However, cargo defaults to an executable with the same name as the package (I think this also requires a main.rs, or a path in a [bin] section, but our verification step fails without an explicit bin.name.

We should implement the same defaults so generic crates work.
STR:

cargo new --bin hello
echo "RUST_PROGRAMS = [ 'hello' ]" > hello/moz.build
echo "DIRS += [ 'hello' ] >> moz.build
./mach build
Blocks: oxidation
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.