From 78b10ca04027a708abb0833be12a663628ad71f0 Mon Sep 17 00:00:00 2001 From: Hollow Man Date: Mon, 18 Aug 2025 19:57:06 +0300 Subject: [PATCH 1/4] Fix unknown field `author` error when building the book using mdbook in main (v0.5.x) ```log 2025-08-18 19:56:41 [ERROR] (mdbook_core::utils): Error: Invalid configuration file 2025-08-18 19:56:41 [ERROR] (mdbook_core::utils): Caused By: TOML parse error at line 2, column 1 | 2 | author = "The Rust Project Developers" | ^^^^^^ unknown field `author`, expected one of `title`, `authors`, `description`, `src`, `language`, `text-direction` ``` Signed-off-by: Hollow Man --- book.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book.toml b/book.toml index b2c0d11..f51dfa3 100644 --- a/book.toml +++ b/book.toml @@ -1,5 +1,5 @@ [book] -author = "The Rust Project Developers" +authors = ["The Rust Project Developers"] title = "The Rustonomicon" description = "The Dark Arts of Advanced and Unsafe Rust Programming" From 1a79ab192054f032625bd7ec2a96f730c1a681e4 Mon Sep 17 00:00:00 2001 From: Noah Snelson Date: Thu, 4 Sep 2025 18:58:14 -0700 Subject: [PATCH 2/4] Add "C" ABI to FFI example --- src/ffi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ffi.md b/src/ffi.md index 2f065a4..2eb4337 100644 --- a/src/ffi.md +++ b/src/ffi.md @@ -90,7 +90,7 @@ The `extern` block can be extended to cover the entire snappy API: use libc::{c_int, size_t}; #[link(name = "snappy")] -unsafe extern { +unsafe extern "C" { fn snappy_compress(input: *const u8, input_length: size_t, compressed: *mut u8, From 7952ab776bf58116ab862f4eeee7c64e548334dc Mon Sep 17 00:00:00 2001 From: sify21 Date: Wed, 24 Sep 2025 16:21:09 +0800 Subject: [PATCH 3/4] Update ffi.md a typo in ffi.md --- src/ffi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ffi.md b/src/ffi.md index 2eb4337..d88cfe2 100644 --- a/src/ffi.md +++ b/src/ffi.md @@ -25,7 +25,7 @@ libc = "0.2.0" Because [snappy](https://github.com/google/snappy) is a static library by default. So there is no C++ std linked in the output artifact. -n order to use this foreign library in Rust, we have to manually specify that we want to link stdc++ in our project. +In order to use this foreign library in Rust, we have to manually specify that we want to link stdc++ in our project. The easiest way to do this is by setting up a build script. First edit `Cargo.toml`, inside `package` add `build = "build.rs"`: From 818486503aba9dd735b8a1b9d26770646ec0f576 Mon Sep 17 00:00:00 2001 From: Perman Date: Wed, 15 Oct 2025 11:34:14 +0500 Subject: [PATCH 4/4] Fix typo in exception-safety.md (BinaryHeap::sift_up, user-defined and unsafe code separated) --- src/exception-safety.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exception-safety.md b/src/exception-safety.md index 762b38b..302ccd6 100644 --- a/src/exception-safety.md +++ b/src/exception-safety.md @@ -104,7 +104,7 @@ code and the unsafe code into two separate phases: ```text bubble_up(heap, index): let end_index = index; - while end_index != 0 && heap[end_index] < heap[parent(end_index)]: + while end_index != 0 && heap[index] < heap[parent(end_index)]: end_index = parent(end_index) let elem = heap[index]