Module ctru::services::romfs

source ·
Expand description

Read-Only Memory FileSystem service.

This service lets the application access a virtual mounted device created using a folder included within the application bundle. After mounting the RomFS file system, the included files and folders will be accessible exactly like any other file, just by using the drive prefix romfs:/<file-path>.

§Usage

This module only gets compiled if the configured RomFS directory is found and the romfs feature is enabled.

Configure the path in your project’s Cargo.toml manifest (the default path is “romfs”). Paths are relative to the CARGO_MANIFEST_DIR environment variable, which is the directory containing the manifest of your package.

[package.metadata.cargo-3ds]
romfs_dir = "romfs"

Alternatively, you can include the RomFS archive manually when building with 3dsxtool.

§Notes

std::path has problems when parsing file paths that include the romfs: prefix. As such, it’s suggested to use the paths directly or to do simple append operations to avoid unexpected behaviour. Related issue.

Structs§

  • Handle to the RomFS service.