|  | [package] | 
|  | name = "compile_with_bazel" | 
|  | version = "0.0.0" | 
|  |  | 
|  | # Mandatory (or Cargo tooling is unhappy) | 
|  | [lib] | 
|  | path = "fake_lib.rs" | 
|  |  | 
|  | [dependencies] | 
|  | mdbook = "0" | 
|  | protoc-gen-prost = "0.2.3" | 
|  |  | 
|  | [package.metadata.raze] | 
|  | workspace_path = "//third_party/rust/cargo" | 
|  | package_aliases_dir = "." | 
|  | targets = [ | 
|  | "x86_64-unknown-linux-gnu", | 
|  | ] | 
|  | genmode = "Remote" | 
|  |  | 
|  | [package.metadata.raze.crates.prost.'0.11.9'] | 
|  | data_dependencies = [ | 
|  | "README.md", | 
|  | ] | 
|  |  | 
|  | [package.metadata.raze.crates.protoc-gen-prost.'0.2.3'] | 
|  | data_dependencies = [ | 
|  | "README.md", | 
|  | ] | 
|  |  | 
|  | [package.metadata.raze.crates.handlebars.'4.3.6'] | 
|  | data_dependencies = [ | 
|  | "src/grammar.pest", | 
|  | ] | 
|  |  | 
|  | [package.metadata.raze.crates.opener.'0.6.1'] | 
|  | data_dependencies = [ | 
|  | "src/xdg-open", | 
|  | ] | 
|  |  | 
|  | [package.metadata.raze.crates.clap.'4.4.6'] | 
|  | data_dependencies = [ | 
|  | "README.md", | 
|  | "examples/demo.md", | 
|  | ] | 
|  |  | 
|  | [package.metadata.raze.crates.clap_complete.'4.4.3'] | 
|  | data_dependencies = [ | 
|  | "README.md", | 
|  | ] | 
|  |  | 
|  | [package.metadata.raze.crates.clap_builder.'4.4.6'] | 
|  | data_dependencies = [ | 
|  | "README.md", | 
|  | ] | 
|  |  | 
|  | [package.metadata.raze.crates.bstr.'1.6.2'] | 
|  | data_dependencies = [ | 
|  | "src/unicode/fsm/grapheme_break_fwd.littleendian.dfa", | 
|  | "src/unicode/fsm/grapheme_break_rev.littleendian.dfa", | 
|  | "src/unicode/fsm/regional_indicator_rev.littleendian.dfa", | 
|  | "src/unicode/fsm/sentence_break_fwd.littleendian.dfa", | 
|  | "src/unicode/fsm/simple_word_fwd.littleendian.dfa", | 
|  | "src/unicode/fsm/whitespace_anchored_fwd.littleendian.dfa", | 
|  | "src/unicode/fsm/whitespace_anchored_rev.littleendian.dfa", | 
|  | "src/unicode/fsm/word_break_fwd.littleendian.dfa", | 
|  | ] | 
|  |  | 
|  | [package.metadata.raze.crates.mdbook.'0.4.35'] | 
|  | data_dependencies = [ | 
|  | "src/theme/playground_editor/ace.js", | 
|  | "src/theme/playground_editor/editor.js", | 
|  | "src/theme/playground_editor/mode-rust.js", | 
|  | "src/theme/playground_editor/theme-dawn.js", | 
|  | "src/theme/playground_editor/theme-tomorrow_night.js", | 
|  |  | 
|  | "src/theme/fonts/OPEN-SANS-LICENSE.txt", | 
|  | "src/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt", | 
|  | "src/theme/fonts/fonts.css", | 
|  | "src/theme/fonts/open-sans-v17-all-charsets-300.woff2", | 
|  | "src/theme/fonts/open-sans-v17-all-charsets-300italic.woff2", | 
|  | "src/theme/fonts/open-sans-v17-all-charsets-600.woff2", | 
|  | "src/theme/fonts/open-sans-v17-all-charsets-600italic.woff2", | 
|  | "src/theme/fonts/open-sans-v17-all-charsets-700.woff2", | 
|  | "src/theme/fonts/open-sans-v17-all-charsets-700italic.woff2", | 
|  | "src/theme/fonts/open-sans-v17-all-charsets-800.woff2", | 
|  | "src/theme/fonts/open-sans-v17-all-charsets-800italic.woff2", | 
|  | "src/theme/fonts/open-sans-v17-all-charsets-italic.woff2", | 
|  | "src/theme/fonts/open-sans-v17-all-charsets-regular.woff2", | 
|  | "src/theme/fonts/source-code-pro-v11-all-charsets-500.woff2", | 
|  |  | 
|  | "src/theme/searcher/elasticlunr.min.js", | 
|  | "src/theme/searcher/mark.min.js", | 
|  | "src/theme/searcher/searcher.js", | 
|  |  | 
|  | "src/theme/ayu-highlight.css", | 
|  | "src/theme/book.js", | 
|  | "src/theme/clipboard.min.js", | 
|  | "src/theme/favicon.png", | 
|  | "src/theme/favicon.svg", | 
|  | "src/theme/head.hbs", | 
|  | "src/theme/header.hbs", | 
|  | "src/theme/highlight.css", | 
|  | "src/theme/highlight.js", | 
|  | "src/theme/index.hbs", | 
|  | "src/theme/redirect.hbs", | 
|  | "src/theme/tomorrow-night.css", | 
|  |  | 
|  | "src/theme/css/chrome.css", | 
|  | "src/theme/css/general.css", | 
|  | "src/theme/css/print.css", | 
|  | "src/theme/css/variables.css", | 
|  |  | 
|  | "src/theme/FontAwesome/css/font-awesome.min.css", | 
|  | "src/theme/FontAwesome/fonts/FontAwesome.otf", | 
|  | "src/theme/FontAwesome/fonts/fontawesome-webfont.eot", | 
|  | "src/theme/FontAwesome/fonts/fontawesome-webfont.svg", | 
|  | "src/theme/FontAwesome/fonts/fontawesome-webfont.ttf", | 
|  | "src/theme/FontAwesome/fonts/fontawesome-webfont.woff", | 
|  | "src/theme/FontAwesome/fonts/fontawesome-webfont.woff2", | 
|  | ] | 
|  | # Generate the binary target alias //third_party/rust:cargo_bin_mdbook. | 
|  | extra_aliased_targets = [ | 
|  | "cargo_bin_mdbook" | 
|  | ] | 
|  | # We end up linking mdbook into a binary. rustc, when doing that, calls gcc as | 
|  | # a linker (probably because cc-rs?). | 
|  | # | 
|  | # On our sandbox sysroot, the gcc used as a linker is /usr/bin/gcc. This gcc | 
|  | # then attempts to call its corresponding system ld, expecting it to be on | 
|  | # PATH. However, rules_rust hermeticizes the build to the point where PATH is | 
|  | # totally stripped out. Here, we add back /usr/bin back as the sole PATH | 
|  | # element, thereby making 'ld' resolvable agan by /usr/bin/gcc. | 
|  | # | 
|  | # In an ideal world, we would be able to translate Bazel C++ toolchain | 
|  | # definitions into Cargo/rustc's build system. These definitions technically | 
|  | # contain everything needed to know how to call a toolchain. However, it seems | 
|  | # like the current ecosystem of linking C/C++ in Rust is not centralized enough | 
|  | # for this to be easily doable, as the responsibility is spread between rustc, | 
|  | # Cargo, and third-party crates like cc-rs. | 
|  | # | 
|  | # For now, this has to do - as long as we don't use Cargo/Rust for secondary | 
|  | # operating system tools like mdbook, and not as something directly in the | 
|  | # transitive dependency set of building a Metropolis release. This is also why | 
|  | # we 'fix' this only for mdbook for now, we don't want to even pretend that | 
|  | # this is something that should be used where reproducibility and hermeticity | 
|  | # matters. | 
|  | additional_env.PATH = "/usr/bin" |