(env_vars: &EnvVars)
| 517 | } |
| 518 | |
| 519 | fn docs_rs_linking(env_vars: &EnvVars) { |
| 520 | // If it's a documentation generation from docs.rs, just copy the bindings |
| 521 | // generated locally to `OUT_DIR`. We do this because the building |
| 522 | // environment of docs.rs doesn't have an network connection, so we cannot |
| 523 | // git clone the FFmpeg. And they also have a limitation on crate's size: |
| 524 | // 10MB, which is not enough to fit in FFmpeg source files. So the only |
| 525 | // thing we can do is copying the locally generated binding files to the |
| 526 | // `OUT_DIR`. |
| 527 | let binding_file_path = &env_vars.out_dir.as_ref().unwrap().join("binding.rs"); |
| 528 | use_prebuilt_binding(Path::new("src/binding.rs"), binding_file_path); |
| 529 | } |
| 530 | |
| 531 | fn main() { |
| 532 | let env_vars = EnvVars::init(); |
no test coverage detected