bytecodealliance / bytecodealliance/rustix

stop enabling dependencies in build.rs by default?

未关闭
#680 15 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
2.1k
派生
294
平均合并
6 天 22 小时
30 天内合并 PR
4

描述

(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?

贡献指南

打开贡献指南

调研方向

首先检查 build.rs 以及启用 libc 和 errno 的 feature 定义,然后将 cargo metadata 报告的依赖关系图与 cargo vendor-filterer 的行为进行比较。当默认依赖配置在不依赖 build.rs 单独激活的情况下得到一致表示,并且 cargo vendor-filterer 不再失败时,该问题即得到解决。

由索引模型根据 Issue 内容生成。

评估

技术栈
rust
领域
build-system
Issue 类型
重构
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。