<navid="sidebar"class="sidebar"aria-label="Table of contents">
<olclass="chapter"><li><ahref="../00-introduction/00-index.html"><strongaria-hidden="true">1.</strong> Introduction</a></li><li><olclass="section"><li><ahref="../00-introduction/01-requirements.html"><strongaria-hidden="true">1.1.</strong> Reader Requirements</a></li><li><ahref="../00-introduction/02-goals_and_style.html"><strongaria-hidden="true">1.2.</strong> Book Goals and Style</a></li><li><ahref="../00-introduction/03-development-setup.html"class="active"><strongaria-hidden="true">1.3.</strong> Development Setup</a></li><li><ahref="../00-introduction/04-hello-magic.html"><strongaria-hidden="true">1.4.</strong> Hello, Magic</a></li><li><ahref="../00-introduction/05-newtype.html"><strongaria-hidden="true">1.5.</strong> Newtype</a></li><li><ahref="../00-introduction/06-help_and_resources.html"><strongaria-hidden="true">1.6.</strong> Help and Resources</a></li></ol></li><li><ahref="../01-limitations/00-index.html"><strongaria-hidden="true">2.</strong> Limitations</a></li><li><olclass="section"><li><ahref="../01-limitations/01-no_floats.html"><strongaria-hidden="true">2.1.</strong> No Floats</a></li><li><ahref="../01-limitations/02-core_only.html"><strongaria-hidden="true">2.2.</strong> Core Only</a></li><li><ahref="../01-limitations/03-volatile_destination.html"><strongaria-hidden="true">2.3.</strong> Volatile Destination</a></li></ol></li><li><ahref="../02-concepts/00-index.html"><strongaria-hidden="true">3.</strong> Concepts</a></li><li><olclass="section"><li><ahref="../02-concepts/01-cpu.html"><strongaria-hidden="true">3.1.</strong> CPU</a></li><li><ahref="../02-concepts/02-bios.html"><strongaria-hidden="true">3.2.</strong> BIOS</a></li><li><ahref="../02-concepts/03-wram.html"><strongaria-hidden="true">3.3.</strong> Work RAM</a></li><li><ahref="../02-concepts/04-io-registers.html"><strongaria-hidden="true">3.4.</strong> IO Registers</a></li><li><ahref="../02-concepts/05-palram.html"><strongaria-hidden="true">3.5.</strong> Palette RAM</a></li><li><ahref="../02-concepts/06-vram.html"><strongaria-hidden="true">3.6.</strong> Video RAM</a></li><li><ahref="../02-concepts/07-oam.html"><strongaria-hidden="true">3.7.</strong> Object Attribute Memory</a></li><li><ahref="../02-concepts/08-rom.html"><strongaria-hidden="true">3.8.</strong> Game Pak ROM / Flash ROM</a></li><li><ahref="../02-concepts/09-sram.html"><strongaria-hidden="true">3.9.</strong> Save RAM</a></li></ol></li><li><ahref="../03-video/00-index.html"><strongaria-hidden="true">4.</strong> Video</a></li><li><olclass="section"><li><ahref="../03-video/01-rgb15.html"><strongaria-hidden="true">4.1.</strong> RBG15 Color</a></li><li><ahref="../03-video/TODO.html"><strongaria-hidden="true">4.2.</strong> TODO</a></li></ol></li><li><ahref="../04-non-video/00-index.html"><strongaria-hidden="true">5.</strong> Non-Video</a></li><li><olclass="section"><li><ahref="../04-non-video/01-buttons.html"><strongaria-hidden="true">5.1.</strong> Buttons</a></li><li><ahref="../04-non-video/02-timers.html"><strongaria-hidden="true">5.2.</strong> Timers</a></li><li><ahref="../04-non-video/03-dma.html"><strongaria-hidden="true">5.3.</strong> Direct Memory Access</a></li><li><ahref="../04-non-video/04-sound.html"><strongaria-hidden="true">5.4.</strong> Sound</a></li><li><ahref="../04-non-video/05-interrupts.html"><strongaria-hidden="true">5.5.</strong> Interrupts</a></li><li><ahref="../04-non-video/06-network.html"><strongaria-hidden="true">5.6.</strong> Network</a></li><li><ahref="../04-non-video/07-game_pak.html"><strongaria-hidden="true">5.7.</strong> Game Pak</a></li></ol></li><li><ahref="../05-examples/00-index.html"><strongaria-hidden="true">6.</strong> Examples</a></li><li><olclass="section"><li><ahref="../05-examples/01-hello_magic.html"><strongaria-hidden="true">6.1.</strong> hello_magic</a></li><li><ahref="../05-examples/02-hello_world.html"><strongaria-hidden="true">6.2.</strong> hello_world</a></li><li><ahref="../05-examples/03-light_cycle.html"><strongaria-hidden="true">6.3.</strong> light_
</nav>
<divid="page-wrapper"class="page-wrapper">
<divclass="page">
<divid="menu-bar"class="menu-bar">
<divid="menu-bar-sticky-container">
<divclass="left-buttons">
<buttonid="sidebar-toggle"class="icon-button"type="button"title="Toggle Table of Contents"aria-label="Toggle Table of Contents"aria-controls="sidebar">
<ahref="../print.html"title="Print this book"aria-label="Print this book">
<iid="print-button"class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<divid="search-wrapper"class="hidden">
<formid="searchbar-outer"class="searchbar-outer">
<inputtype="search"name="search"id="searchbar"name="searchbar"placeholder="Search this book ..."aria-controls="searchresults-outer"aria-describedby="searchresults-header">
<li>This builds your Rust source. It accepts <em>most of</em> the normal options, such
as <code>--release</code>, and options, such as <code>--bin foo</code> or <code>--examples</code>, that you'd
expect <code>cargo</code> to accept.</li>
<li>You <strong>can not</strong> build and run tests this way, because they require <code>std</code>,
which the GBA doesn't have. If you want you can still run some of your
project's tests with <code>cargo test --lib</code> or similar, but that builds for your
local machine, so anything specific to the GBA (such as reading and writing
registers) won't be testable that way. If you want to isolate and try out
some piece code running on the GBA you'll unfortunately have to make a demo
for it in your <code>examples/</code> directory and then run the demo in an emulator
and see if it does what you expect.</li>
<li>The file extension is important! It will work if you forget it, but <code>cargo xbuild</code> takes the inclusion of the extension as a flag to also compile
dependencies with the same sysroot, so you can include other crates in your