Crate ctru

source ·
Expand description

Safe and idiomatic Rust wrapper around libctru.


This crate behaves as the main tool to access system-specific functionality on the Nintendo 3DS when developing homebrew software in Rust. Thanks to it, developers can develop userland applications by accessing access the underlying system services and the console’s hardware (such as HID devices, network capabilities, graphics, built-in cameras, etc.).

Among these features, ctru-rs also automatically includes functionality to properly integrate the Rust std with the console’s operating system, which the developer would otherwise need to implement manually.


Thoroughly read the official ctru-rs wiki which guides you through the setup needed to install the required toolchain and helpful tools. After following the guide and understanding the many quirks of the Nintendo 3DS homebrew development environment, you can create a new project by including this crate as a dependency in your Cargo.toml manifest and build your binaries either manually (for the armv6k-nintendo-3ds target) or via cargo-3ds.


  • pub use crate::error::Error;
  • pub use crate::error::Result;


  • System Applets.
  • Virtual text console.
  • Error handling interface.
  • LINEAR memory allocator.
  • Mii data.
  • Utilities to get information about the operating system and hardware state.
  • use ctru::prelude::*; to import common services, members and functions.
  • OS services used to handle system-specific functionality.