Skip to content

Commit

Permalink
Install a statically linked version of dot.
Browse files Browse the repository at this point in the history
Also switch lightgreen to green3, because this old version of dot doesn't know what "lightgreen" is.
  • Loading branch information
jonathanpallant committed Nov 20, 2024
1 parent d555595 commit 602e287
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ html
mdbook
mdbook-graphviz
mdslides
dot
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ set -euo pipefail
# We only support macOS (the x86 binaries work OK on Apple Silicon), or x86-64 Linux
if [ $(uname) == "Darwin" ]; then
./mdbook --version || curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-apple-darwin.tar.gz | tar -xvzf -
dot --version || brew install graphviz
dot -V || brew install graphviz
mdbook-graphviz --version || cargo install mdbook-graphviz
./mdslides --version || ( curl -sSL https://github.com/ferrous-systems/mdslides/releases/download/v0.4.0/mdslides-x86_64-apple-darwin.tar.xz | tar -xvJf - \
&& mv ./mdslides-*/mdslides . \
&& rm -rf ./mdslides-*/ )
else
./mdbook --version || curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xvzf -
dot --version || ( apt-get update -y && apt-get install -y graphviz )
dot -V || ( curl -ssL https://github.com/restruct/dot-static/raw/refs/heads/master/x64/dot_static -o ./dot && chmod a+x ./dot )
./mdbook-graphviz --version || ( curl -sSL https://github.com/dylanowen/mdbook-graphviz/releases/download/v0.2.1/mdbook-graphviz_v0.2.1_x86_64-unknown-linux-musl.zip -o mdbook-graphviz.zip \
&& unzip mdbook-graphviz.zip \
&& rm mdbook-graphviz.zip \
Expand Down
2 changes: 1 addition & 1 deletion training-slides/src/advanced-strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ digraph {
"string:" [color=white];
node [shape=record, fontcolor=black, fontsize=14, width=3];
_inner [label="<f0> 0x48 | 0x65 | 0x6c | 0x6c | 0x6f | 0x21 | 0xFF | 0xFF", color=blue, fillcolor=lightgreen, style=filled];
_inner [label="<f0> 0x48 | 0x65 | 0x6c | 0x6c | 0x6f | 0x21 | 0xFF | 0xFF", color=blue, fillcolor=green3, style=filled];
node [shape=record, fontcolor=black, fontsize=14, width=2];
string [label="<p0> ptr | len = 6 | cap = 8", color=blue, fillcolor=lightblue, style=filled];
string:p0 -> _inner:f0;
Expand Down
4 changes: 2 additions & 2 deletions training-slides/src/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ digraph {
"vector:" [color=white];
node [shape=record, fontcolor=black, fontsize=14, width=3];
_inner [label="<f0> 2 | 4 | 6 | 0", color=blue, fillcolor=lightgreen, style=filled];
_inner [label="<f0> 2 | 4 | 6 | 0", color=blue, fillcolor=green3, style=filled];
node [shape=record, fontcolor=black, fontsize=14, width=2];
vector [label="<p0> ptr | len = 3 | cap = 4", color=blue, fillcolor=lightblue, style=filled];
vector:p0 -> _inner:f0;
Expand Down Expand Up @@ -247,7 +247,7 @@ digraph {
"string:" [color=white];
node [shape=record, fontcolor=black, fontsize=14, width=3];
_inner [label="<f0> 0x48 | 0x65 | 0x6c | 0x6c | 0x6f | 0x21", color=blue, fillcolor=lightgreen, style=filled];
_inner [label="<f0> 0x48 | 0x65 | 0x6c | 0x6c | 0x6f | 0x21", color=blue, fillcolor=green3, style=filled];
node [shape=record, fontcolor=black, fontsize=14, width=2];
string [label="<p0> ptr | len = 6 | cap = 6", color=blue, fillcolor=lightblue, style=filled];
string:p0 -> _inner:f0;
Expand Down
2 changes: 1 addition & 1 deletion training-slides/src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ History](https://rust-lang.github.io/rustup-components-history/)

```dot process
digraph {
node [shape=record, fontcolor=black, fontsize=14, width=3, fillcolor=lightgreen, style=filled];
node [shape=record, fontcolor=black, fontsize=14, width=3, fillcolor=green3, style=filled];
cargo -> rustc;
cargo -> rustdoc;
cargo -> rustfmt;
Expand Down
2 changes: 1 addition & 1 deletion training-slides/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Most of our modules are available now (shown in blue), but some are still in dev

```dot process
digraph {
node [shape=record, width=1.5, fillcolor=lightgreen, style=filled];
node [shape=record, width=1.5, fillcolor=green3, style=filled];
Advanced [label="Advanced Rust"];
Applied [label="Applied Rust"];
BareMetal [label="Bare-Metal Rust"];
Expand Down
2 changes: 1 addition & 1 deletion training-slides/src/pac-svd2rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ We can use `svd2rust` to turn this into a Peripheral Access Crate.
digraph {
rankdir=LR;
node [shape=ellipse, width=1.5, fillcolor=lightgreen, style=filled];
node [shape=ellipse, width=1.5, fillcolor=green3, style=filled];
svd [label="SVD XML"];
rust [label="Rust Source"];
node [shape=record, width=1.5, fillcolor=lightblue, style=filled];
Expand Down
4 changes: 2 additions & 2 deletions training-slides/src/rust-bare-metal.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ digraph {
node [shape=record, width=1.5, fillcolor=orange, style=filled];
lcd_driver [label="SPI LCD Driver\n(ssd1306)"]
node [shape=folder, width=1.5, fillcolor=lightgreen, style=filled];
node [shape=folder, width=1.5, fillcolor=green3, style=filled];
hal_traits [label="HAL Traits\n(embedded_hal)"]
node [shape=record, width=1.5, fillcolor=lightgreen, style=filled];
node [shape=record, width=1.5, fillcolor=green3, style=filled];
rt [label="Core Runtime\n(cortex_m_rt)"]
cp [label="Core Peripherals\n(cortex_m)"]
Expand Down

0 comments on commit 602e287

Please sign in to comment.