Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
YeautyYE opened this issue Mar 7, 2025 · 2 comments

Comments

@YeautyYE
Copy link

YeautyYE commented Mar 7, 2025

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!

@syphar
Copy link
Member

syphar commented Mar 10, 2025

A good start is always our https://docs.rs/about/builds page.

Generally people solve this issue by either

Often it also helps to look at how the other library (in this case, ffmpeg-sys-next) builds its docs.

I also have a hunch that the ffmpeg version included in rust-lang/crates-build-env#168 would suffice?

@syphar syphar closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2025
@syphar
Copy link
Member

syphar commented Mar 10, 2025

In any case, we will never allow network access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants