Crate ctru

Source
Expand description

Safe and idiomatic Rust wrapper around libctru.

§About

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.

§Usage

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.

Re-exports§

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

Modules§

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

Structs§

Utf16Writer
A helper type for writing string data into [u16] buffers.

Functions§

set_panic_hook
Sets a custom panic hook that uses the error applet to display panic messages.