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