Skip to content

[enhancement] 消费端 default-features 关闭语法(default = [...] 已有,但退不掉;挡住 compat.ffmpeg 裁剪档形态) #242

Description

@Sunrisepeak

诉求

Feature System v2 已支持包侧 default = [...] 默认激活集,但消费端没有
关闭默认集的语法
(cargo 的 default-features = false 对应物)。没有它,
"默认 full + 可退到裁剪档"的包形态表达不出来:

场景(compat.ffmpeg 裁剪档,mcpp-index 规划中)

FFmpeg 全量直编(2281 TU)默认档已发布;想提供 decode-min 裁剪档:

  • features 是加法语义 → 基础源集必须是 min、full feature 补齐其余;
  • 已发布消费者(ffmpeg 模块包)期望全量 → 包侧 default = ["full"] 保兼容;
  • 但 min 消费者需要 default-features = false 才能退回基础集 —— 语法不存在。

期望的消费端拼写(参照 cargo):

[dependencies.compat]
ffmpeg = { version = "8.1.2", default-features = false }                      # min
ffmpeg = { version = "8.1.2", default-features = false, features = ["x264"] } # 精选

关联

裁剪档还需要 per-profile config 快照(config_components.h 随组件集变化,
generated_files 不可 feature 化)——这部分打算用包内 build.mcpp 双快照选择解决,
不需要 mcpp 改动;唯一挡路的是本 issue 的消费端 opt-out。

环境

mcpp 0.0.97

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions