Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python-book/src/ch01-introduction-and-motivation.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ graph LR
PY_GIL --> PY_OS["OS / Hardware"]
end

PY ~~~ RS
subgraph RS["🦀 Rust"]
direction TB
RS_CODE["Your Code"] --> RS_NONE["No runtime overhead"]
Expand Down
2 changes: 2 additions & 0 deletions python-book/src/ch04-control-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ flowchart LR
P2 --> P4["result used later"]
P3 --> P4
end

Python ~~~ Rust
subgraph Rust ["Rust — Expressions"]
R1["let result = if cond"] --> R2["{ 'yes' }"]
R1 --> R3["{ 'no' }"]
Expand Down
1 change: 1 addition & 0 deletions python-book/src/ch05-data-structures-and-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ flowchart LR
PH --> PHT["height: float obj"]
PH --> PD["__dict__"]
end
Python ~~~ Rust
subgraph Rust ["Rust Struct (Stack)"]
RW["width: f64<br/>(8 bytes)"] --- RH["height: f64<br/>(8 bytes)"]
end
Expand Down
1 change: 1 addition & 0 deletions python-book/src/ch10-traits-and-generics.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ flowchart TB
VT --> I1["Article::summarize()"]
VT --> I2["Tweet::summarize()"]
end
Static ~~~ Dynamic
style Static fill:#d4edda
style Dynamic fill:#fff3cd
```
Expand Down
2 changes: 1 addition & 1 deletion python-book/src/ch11-from-and-into-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ let n: i32 = "42".parse()?; // Propagate error with ?
### The From/Into Relationship

```mermaid
flowchart LR
flowchart TB
A["impl From&lt;A&gt; for B"] -->|"auto-generates"| B["impl Into&lt;B&gt; for A"]
C["Celsius::from(Fahrenheit(212.0))"] ---|"same as"| D["Fahrenheit(212.0).into()"]
style A fill:#d4edda
Expand Down
2 changes: 1 addition & 1 deletion python-book/src/ch15-migration-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ let db_host = get_config()["database"]["host"].as_str().unwrap();
## Incremental Adoption Strategy

```mermaid
flowchart LR
flowchart TB
A["1️⃣ Profile Python<br/>(find hotspots)"] --> B["2️⃣ Write Rust Extension<br/>(PyO3 + maturin)"]
B --> C["3️⃣ Replace Python Call<br/>(same API)"]
C --> D["4️⃣ Expand Gradually<br/>(more functions)"]
Expand Down