Serge Bazanski | cbf1fa9 | 2021-07-02 17:28:50 +0200 | [diff] [blame] | 1 | [package] |
| 2 | name = "compile_with_bazel" |
| 3 | version = "0.0.0" |
| 4 | |
| 5 | # Mandatory (or Cargo tooling is unhappy) |
| 6 | [lib] |
| 7 | path = "fake_lib.rs" |
| 8 | |
| 9 | [dependencies] |
| 10 | mdbook = "0" |
| 11 | |
| 12 | [package.metadata.raze] |
| 13 | workspace_path = "//third_party/rust/cargo" |
| 14 | package_aliases_dir = "." |
| 15 | targets = [ |
| 16 | "x86_64-unknown-linux-gnu", |
| 17 | ] |
| 18 | genmode = "Remote" |
| 19 | |
Leopold | 2aa8b18 | 2023-01-14 23:31:43 +0100 | [diff] [blame^] | 20 | [package.metadata.raze.crates.handlebars.'4.3.6'] |
Serge Bazanski | cbf1fa9 | 2021-07-02 17:28:50 +0200 | [diff] [blame] | 21 | data_dependencies = [ |
| 22 | "src/grammar.pest", |
| 23 | ] |
| 24 | |
Leopold | 2aa8b18 | 2023-01-14 23:31:43 +0100 | [diff] [blame^] | 25 | [package.metadata.raze.crates.opener.'0.5.0'] |
| 26 | data_dependencies = [ |
| 27 | "src/xdg-open", |
| 28 | ] |
| 29 | |
| 30 | [package.metadata.raze.crates.clap.'3.2.23'] |
| 31 | data_dependencies = [ |
| 32 | "README.md", |
| 33 | "examples/demo.md", |
| 34 | ] |
| 35 | |
| 36 | [package.metadata.raze.crates.clap_complete.'3.2.5'] |
| 37 | data_dependencies = [ |
| 38 | "README.md", |
| 39 | ] |
| 40 | |
| 41 | [package.metadata.raze.crates.bstr.'0.2.17'] |
| 42 | data_dependencies = [ |
| 43 | "src/unicode/fsm/grapheme_break_fwd.littleendian.dfa", |
| 44 | "src/unicode/fsm/grapheme_break_rev.littleendian.dfa", |
| 45 | "src/unicode/fsm/regional_indicator_rev.littleendian.dfa", |
| 46 | "src/unicode/fsm/sentence_break_fwd.littleendian.dfa", |
| 47 | "src/unicode/fsm/simple_word_fwd.littleendian.dfa", |
| 48 | "src/unicode/fsm/whitespace_anchored_fwd.littleendian.dfa", |
| 49 | "src/unicode/fsm/whitespace_anchored_rev.littleendian.dfa", |
| 50 | "src/unicode/fsm/word_break_fwd.littleendian.dfa", |
| 51 | ] |
| 52 | |
| 53 | [package.metadata.raze.crates.mdbook.'0.4.22'] |
Serge Bazanski | cbf1fa9 | 2021-07-02 17:28:50 +0200 | [diff] [blame] | 54 | data_dependencies = [ |
| 55 | "src/theme/playground_editor/ace.js", |
| 56 | "src/theme/playground_editor/editor.js", |
| 57 | "src/theme/playground_editor/mode-rust.js", |
| 58 | "src/theme/playground_editor/theme-dawn.js", |
| 59 | "src/theme/playground_editor/theme-tomorrow_night.js", |
| 60 | |
| 61 | "src/theme/fonts/OPEN-SANS-LICENSE.txt", |
| 62 | "src/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt", |
| 63 | "src/theme/fonts/fonts.css", |
| 64 | "src/theme/fonts/open-sans-v17-all-charsets-300.woff2", |
| 65 | "src/theme/fonts/open-sans-v17-all-charsets-300italic.woff2", |
| 66 | "src/theme/fonts/open-sans-v17-all-charsets-600.woff2", |
| 67 | "src/theme/fonts/open-sans-v17-all-charsets-600italic.woff2", |
| 68 | "src/theme/fonts/open-sans-v17-all-charsets-700.woff2", |
| 69 | "src/theme/fonts/open-sans-v17-all-charsets-700italic.woff2", |
| 70 | "src/theme/fonts/open-sans-v17-all-charsets-800.woff2", |
| 71 | "src/theme/fonts/open-sans-v17-all-charsets-800italic.woff2", |
| 72 | "src/theme/fonts/open-sans-v17-all-charsets-italic.woff2", |
| 73 | "src/theme/fonts/open-sans-v17-all-charsets-regular.woff2", |
| 74 | "src/theme/fonts/source-code-pro-v11-all-charsets-500.woff2", |
| 75 | |
| 76 | "src/theme/searcher/elasticlunr.min.js", |
| 77 | "src/theme/searcher/mark.min.js", |
| 78 | "src/theme/searcher/searcher.js", |
| 79 | |
| 80 | "src/theme/ayu-highlight.css", |
| 81 | "src/theme/book.js", |
| 82 | "src/theme/clipboard.min.js", |
| 83 | "src/theme/favicon.png", |
| 84 | "src/theme/favicon.svg", |
| 85 | "src/theme/head.hbs", |
| 86 | "src/theme/header.hbs", |
| 87 | "src/theme/highlight.css", |
| 88 | "src/theme/highlight.js", |
| 89 | "src/theme/index.hbs", |
| 90 | "src/theme/redirect.hbs", |
| 91 | "src/theme/tomorrow-night.css", |
| 92 | |
| 93 | "src/theme/css/chrome.css", |
| 94 | "src/theme/css/general.css", |
| 95 | "src/theme/css/print.css", |
| 96 | "src/theme/css/variables.css", |
| 97 | |
| 98 | "src/theme/FontAwesome/css/font-awesome.min.css", |
| 99 | "src/theme/FontAwesome/fonts/FontAwesome.otf", |
| 100 | "src/theme/FontAwesome/fonts/fontawesome-webfont.eot", |
| 101 | "src/theme/FontAwesome/fonts/fontawesome-webfont.svg", |
| 102 | "src/theme/FontAwesome/fonts/fontawesome-webfont.ttf", |
| 103 | "src/theme/FontAwesome/fonts/fontawesome-webfont.woff", |
| 104 | "src/theme/FontAwesome/fonts/fontawesome-webfont.woff2", |
| 105 | ] |
| 106 | # Generate the binary target alias //third_party/rust:cargo_bin_mdbook. |
| 107 | extra_aliased_targets = [ |
| 108 | "cargo_bin_mdbook" |
| 109 | ] |
| 110 | # We end up linking mdbook into a binary. rustc, when doing that, calls gcc as |
| 111 | # a linker (probably because cc-rs?). |
| 112 | # |
Leopold | 7fbf104 | 2023-01-06 19:57:37 +0100 | [diff] [blame] | 113 | # On our sandbox sysroot, the gcc used as a linker is /usr/bin/gcc. This gcc |
Serge Bazanski | cbf1fa9 | 2021-07-02 17:28:50 +0200 | [diff] [blame] | 114 | # then attempts to call its corresponding system ld, expecting it to be on |
| 115 | # PATH. However, rules_rust hermeticizes the build to the point where PATH is |
| 116 | # totally stripped out. Here, we add back /usr/bin back as the sole PATH |
| 117 | # element, thereby making 'ld' resolvable agan by /usr/bin/gcc. |
| 118 | # |
| 119 | # In an ideal world, we would be able to translate Bazel C++ toolchain |
| 120 | # definitions into Cargo/rustc's build system. These definitions technically |
| 121 | # contain everything needed to know how to call a toolchain. However, it seems |
| 122 | # like the current ecosystem of linking C/C++ in Rust is not centralized enough |
| 123 | # for this to be easily doable, as the responsibility is spread between rustc, |
| 124 | # Cargo, and third-party crates like cc-rs. |
| 125 | # |
| 126 | # For now, this has to do - as long as we don't use Cargo/Rust for secondary |
| 127 | # operating system tools like mdbook, and not as something directly in the |
| 128 | # transitive dependency set of building a Metropolis release. This is also why |
| 129 | # we 'fix' this only for mdbook for now, we don't want to even pretend that |
| 130 | # this is something that should be used where reproducibility and hermeticity |
| 131 | # matters. |
| 132 | additional_env.PATH = "/usr/bin" |