Skip to content

Commit cf23769

Browse files
Astralejacobsky
authored andcommitted
Adds a Table of content for src/faq/* using mdbook-toc
1 parent 2345ac2 commit cf23769

File tree

8 files changed

+24
-1
lines changed

8 files changed

+24
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ An online version of the book is available at [godot-rust.github.io/book/](https
77
The book is built with [mdBook](https://github.com/rust-lang-nursery/mdBook). To build the book locally, you can run:
88

99
```
10-
$ cargo install mdbook
10+
$ cargo install mdbook mdbook-toc
1111
$ mdbook build
1212
```
1313

book.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ authors = ["The godot-rust developers"]
33
multilingual = false
44
src = "src"
55
title = "The godot-rust Book"
6+
7+
[preprocessor.toc]
8+
max-level = 2
9+
command = "mdbook-toc"
10+
renderer = ["html"]

src/faq/code.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# FAQ: Common code questions
22

3+
## Table of contents
4+
<!-- toc -->
5+
36
## What is the `BorrowFailed` error and why do I keep getting it?
47

58
In Rust, [there can only be *one* `&mut` reference to the same memory location at the same time](https://docs.rs/dtolnay/0.0.9/dtolnay/macro._02__reference_types.html). To enforce this while making simple use cases easier, the bindings make use of [interior mutability](https://doc.rust-lang.org/book/ch15-05-interior-mutability.html). This works like a lock: whenever a method with `&mut self` is called, it will try to obtain a lock on the `self` value, and hold it *until it returns*. As a result, if another method that takes `&mut self` is called in the meantime for whatever reason (e.g. signals), the lock will fail and an error (`BorrowFailed`) will be produced.

src/faq/community.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# FAQ: Community
22

3+
## Table of contents
4+
<!-- toc -->
5+
36
## I need help, where can I ask?
47

58
The godot-rust project uses several different sources for different kinds of information.

src/faq/configuration.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# FAQ: Configuration
22

3+
## Table of contents
4+
<!-- toc -->
5+
36
## How do I create the library file for my GDNative binary?
47

58
You can create .gdnlib files with either of the following methods.

src/faq/godot4.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# FAQ: Godot 4.0 Status
22

3+
## Table of contents
4+
<!-- toc -->
5+
36
## What is the status of Godot 4 Support?
47

58
Currently we are still in the planning phase of determining how to support Godot 4.0 and where we will focus our efforts in the future.

src/faq/multithreading.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# FAQ: Multithreading
22

3+
## Table of contents
4+
<!-- toc -->
5+
36
## How do I use multithreading?
47

58
Follow [Godot's thread safety guidelines](https://docs.godotengine.org/en/stable/tutorials/threads/index.html) and change your settings to "Multi-threaded" in "Project Settings > Rendering > Threading".

src/faq/support.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# FAQ: Versioning and supported platforms
22

3+
## Table of contents
4+
<!-- toc -->
5+
36
## What does godot-rust's version mean?
47

58
godot-rust follows [Cargo's semantic versioning](https://doc.rust-lang.org/cargo/reference/semver.html) for the API breaking changes.

0 commit comments

Comments
 (0)