Skip to content

docs.rs build failure for ez-ffmpeg: Unable to fetch FFmpeg source due to network restrictions #2765

Closed as not planned
@YeautyYE

Description

@YeautyYE

Crate name

ez-ffmpeg

Build failure link

https://docs.rs/crate/ez-ffmpeg/0.1.1/builds/1836231

Additional details

I'm encountering an issue when generating documentation on docs.rs for my project, ez-ffmpeg. The project depends on ffmpeg-sys-next and in version 0.1.1 I've enabled its build feature. This feature is necessary because the default Linux environment does not include FFmpeg 7.1, resulting in missing items like ffmpeg_sys_next::AVChannelOrder::AV_CHANNEL_ORDER_UNSPEC.

To resolve these missing components, the build feature compiles FFmpeg 7.1 during the build process. However, docs.rs restricts external network access, and the build script fails when attempting to clone the FFmpeg source from GitHub. An excerpt from the logs is as follows:

Cloning into 'ffmpeg-7.1'...
fatal: unable to access 'https://github.com/FFmpeg/FFmpeg/': Could not resolve host: github.com
...
called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "fetch failed" }

I understand that the network restrictions on docs.rs are in place for security and reliability, but this leaves me with no alternative method to generate documentation for ez-ffmpeg. Is there a recommended workaround or configuration option (for example, an environment variable or a docs.rs-specific flag) that would allow skipping or handling the network-dependent build step? Any guidance or suggestions on how to proceed would be greatly appreciated.

Environment:

  • rustc version: 1.87.0-nightly (b74da9613 2025-03-06)
  • docs.rs version: 0.6.0 (004a02c 2025-03-05)

Thank you for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions