bytecodealliance / bytecodealliance/rustix

stop enabling dependencies in build.rs by default?

Open
#680 15 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.1k
Forks
294
Avg merge
6d 22h
Merged PRs (30d)
4

Description

(I'm basically using issues as a communication mechanism here)

See https://github.com/coreos/cargo-vendor-filterer/issues/71

TL;DR when rustix 0.37 came along with https://github.com/bytecodealliance/rustix/commit/a2c6c7a8b7adcf46592b7519ba90ecece18b4bd6 this ended up enabling `libc` by default and that pulled in the `errno` dependency by default.

However, `cargo metadata` doesn't see this dependency, it's only enabled via `build.rs`.

And that ends up breaking `cargo vendor-filterer`.

Since in reality, libc is enabled by default, ISTM we can rework the features and build scripts here right?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing build.rs and the feature definitions that enable libc and errno, then compare the dependency graph reported by cargo metadata with cargo vendor-filterer behavior. The issue is resolved when the default dependency configuration is represented consistently without build.rs-only activation and cargo vendor-filterer no longer breaks.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.