| 143 | |
| 144 | |
| 145 | def _run_cargo_doc(repo_root: Path) -> None: |
| 146 | env = os.environ.copy() |
| 147 | existing = env.get("RUSTDOCFLAGS", "") |
| 148 | cap_lints = "--cap-lints allow" |
| 149 | env["RUSTDOCFLAGS"] = f"{existing} {cap_lints}".strip() |
| 150 | subprocess.run( |
| 151 | [ |
| 152 | "cargo", |
| 153 | "doc", |
| 154 | "--no-deps", |
| 155 | "-p", |
| 156 | "nemo-relay", |
| 157 | "-p", |
| 158 | "nemo-relay-adaptive", |
| 159 | "-p", |
| 160 | "nemo-relay-ffi", |
| 161 | ], |
| 162 | cwd=repo_root, |
| 163 | env=env, |
| 164 | check=True, |
| 165 | ) |
| 166 | |
| 167 | |
| 168 | def _output_relative(crate_name: str, crate_dir: Path, html_path: Path) -> Path: |