diff --git a/docs/00-introduction/00-index.html b/docs/00-introduction/00-index.html index ca89eb4..2ce175c 100644 --- a/docs/00-introduction/00-index.html +++ b/docs/00-introduction/00-index.html @@ -72,7 +72,7 @@
@@ -137,16 +137,20 @@

Introduction

-

This is the book for learning how to write GBA games in Rust.

+

This is the book for learning how to write GameBoy Advance (GBA) games in Rust.

I'm Lokathor, the main author of the book. There's also Ketsuban who provides the technical advisement, reviews the PRs, and keeps my crazy in check.

The book is a work in progress, as you can see if you actually try to open many of the pages listed in the Table Of Contents.

Feedback

-

It's also often hard to tell when you've explained something properly to someone -who doesn't understand the concept yet. Please, if things don't make sense then -file an issue about it so I know -where things need to improve.

+

It's very often hard to tell when you've explained something properly. In the +same way that your brain will read over small misspellings and correct things +into the right word, if an explanation for something you already understand +accidentally skips over some small detail then your brain can fill in the gaps +without you realizing it.

+

Please, if things don't make sense then file an +issue about it so I know where +things need to improve.

diff --git a/docs/00-introduction/01-requirements.html b/docs/00-introduction/01-requirements.html index 1a77f27..6533b50 100644 --- a/docs/00-introduction/01-requirements.html +++ b/docs/00-introduction/01-requirements.html @@ -72,7 +72,7 @@
diff --git a/docs/00-introduction/02-goals_and_style.html b/docs/00-introduction/02-goals_and_style.html index 6644fdc..ecc7fe2 100644 --- a/docs/00-introduction/02-goals_and_style.html +++ b/docs/00-introduction/02-goals_and_style.html @@ -72,7 +72,7 @@
diff --git a/docs/00-introduction/03-development-setup.html b/docs/00-introduction/03-development-setup.html index cfb680b..8f1de5a 100644 --- a/docs/00-introduction/03-development-setup.html +++ b/docs/00-introduction/03-development-setup.html @@ -72,7 +72,7 @@
diff --git a/docs/00-introduction/04-hello-magic.html b/docs/00-introduction/04-hello-magic.html index 2d8fb46..083a468 100644 --- a/docs/00-introduction/04-hello-magic.html +++ b/docs/00-introduction/04-hello-magic.html @@ -72,7 +72,7 @@
@@ -152,8 +152,8 @@ and causing problems for yourself.

just this once we'll go full magic number crazy town, for fun. Ready? Here goes:

hello_magic.rs:

-
#![feature(start)]
-#![no_std]
+
#![no_std]
+#![feature(start)]
 
 #[panic_handler]
 fn panic(_info: &core::panic::PanicInfo) -> ! {
@@ -191,7 +191,7 @@ Well that's what the whole rest of the book is about!

- @@ -209,7 +209,7 @@ Well that's what the whole rest of the book is about!

- diff --git a/docs/00-introduction/06-help_and_resources.html b/docs/00-introduction/05-help_and_resources.html similarity index 76% rename from docs/00-introduction/06-help_and_resources.html rename to docs/00-introduction/05-help_and_resources.html index 947acdf..e6a6713 100644 --- a/docs/00-introduction/06-help_and_resources.html +++ b/docs/00-introduction/05-help_and_resources.html @@ -72,7 +72,7 @@
@@ -198,13 +198,13 @@ seems to have a more active forum but less of a focus on actual coding.

That seems like enough for all of our examples, so we'll stop there. We could -add more things, such as making the From impl optional (because what if you -shouldn't unwrap it for some weird reason?), allowing for more precise -visibility controls (on both the newtype overall and the inner field), and maybe -even other things I can't think of right now. We won't really need those in our -example code for this book, so it's probably nicer to just keep the macro -simpler and quit while we're ahead.

-

As a reminder: remember that macros have to appear before they're invoked in -your source, so the newtype macro will always have to be at the very top of -your file, or in a module that's declared before other modules and code.

+add more things:

+
    +
  • Making the From impl being optional. We'd have to make the newtype +invocation be more complicated somehow, the user puts ", no-unwrap" after the +inner type declaration or something, or something like that.
  • +
  • Allowing for more precise visibility controls on the wrapping type and on the +inner field. This would add a lot of line noise, so we'll just always have our +newtypes be pub.
  • +
  • Allowing for generic newtypes, which might sound silly but that we'll actually +see an example of soon enough. To do this you might think that we can change +the :ident declarations to :ty, but since we're declaring a fresh type not +using an existing type we have to accept it as an :ident. The way you get +around this is with a proc-macro, which is a lot more powerful but which also +requires that you write the proc-macro in an entirely other crate that gets +compiled first. We don't need that much power, so for our examples we'll go +with the macro_rules version and just do it by hand in the few cases where we +need a generic newtype.
  • +
  • Allowing for Deref and DerefMut, which usually defeats the point of doing +the newtype, but maybe sometimes it's the right thing, so if you were going +for the full industrial strength version with a proc-macro and all you might +want to make that part of your optional add-ons as well the same way you might +want optional From. You'd probably want From to be "on by default" and +Deref/DerefMut to be "off by default", but whatever.
  • +
+

As a reminder: remember that macro_rules macros have to appear before +they're invoked in your source, so the newtype macro will always have to be at +the very top of your file, or if you put it in a module within your project +you'll need to declare the module before anything that uses it.