build
Build specific targets in the nx-std monorepo using just tasks. Use when compiling NRO files, libraries, or other build artifacts.
When & Why to Use This Skill
This Claude skill provides a streamlined interface for managing the build lifecycle within the nx-std monorepo. By leveraging the 'just' task runner, it abstracts complex Meson and Cargo build system commands into simple, executable tasks. It enables developers to automate environment configuration, manage build options, and compile specific artifacts like NRO files and libraries, ensuring consistency and reducing manual errors in the development workflow.
Use Cases
- Initial Project Setup: Automatically initialize the build directory and configure the Meson build system with default or custom options using 'just configure'.
- Targeted Compilation: Build specific artifacts such as NRO files, system libraries, or test suites by identifying exact target names through 'just list-targets'.
- Dynamic Reconfiguration: Update existing build settings and toggle project features (e.g., enabling/disabling specific drivers) without performing a full clean build.
- Build Artifact Management: Locate and verify build outputs, including NRO/NSP bundles and Rust compilation artifacts, within the structured build directory.
- CI/CD Automation: Integrate standardized build tasks into automated pipelines to ensure consistent compilation across different environments.
| name | build |
|---|---|
| description | Configure, reconfigure, and build targets in the nx-std monorepo using just tasks. Use when configuring build options, reconfiguring an existing build, or compiling NRO files and other build artifacts. |
| allowed-tools | Bash(just --list:*), Bash(just configure:*), Bash(just reconfigure:*), Bash(just list-targets:*), Bash(just list-options:*), Bash(just list-options-configured:*), Bash(just list-dependencies:*), Bash(just build:*), Bash(just meson-compile:*), Bash(just compile:*), Bash(just build-tests:*) |
Build Target Skill
MANDATORY: Use just tasks for all build operations in this project.
Important: This is a Meson Project
This project uses the Meson build system with Cargo integration. Configuration must be done first before building any targets.
Initial Configuration
If buildDir/ doesn't exist (first time setup):
just configure
This runs meson setup buildDir with default options from meson.options.
With options:
just configure -Duse_nx=enabled
Reconfiguring an Existing Build
If buildDir/ already exists and you need to change options, use reconfigure:
just reconfigure -Duse_nx=enabled -Duse_nx_sf=disabled
This runs meson setup --reconfigure to update the existing configuration.
When to use which:
just configure- First time setup, or afterjust clean-alljust reconfigure- Changing options on an already-configured build
Listing Available Options
List all project options (from meson.options):
just list-options
List currently configured options (requires configured build):
just list-options-configured
Configuring with Options
Configure with specific options:
just configure -Duse_nx=enabled
Configure with multiple options:
just configure -Duse_nx=enabled -Duse_libnx_dkp=disabled
Tip: Run just list-options first to see available options and their defaults.
Listing Available Targets
After configuration, list available targets to see what can be compiled:
just list-targets
This shows all build targets with their names, types, and locations.
Building a Target
Primary command: just build <target-name>
Aliases: just meson-compile <target-name> or just compile <target-name>
Examples
Build hbmenu:
just build hbmenu.nro
Build tests:
just build nx-tests.nro
Or use the dedicated test task:
just build-tests
Build multiple targets:
just build hbmenu.nro nx-tests.nro
Build all targets (no arguments):
just build
Critical Rules
- Configure first - Run
just configurebefore building ifbuildDir/doesn't exist - Reconfigure to change options - Use
just reconfigurewhenbuildDir/already exists - NEVER use
ninjadirectly - always usejust build - NEVER use
meson compiledirectly - always usejust build - NEVER use
meson setupdirectly - always usejust configureorjust reconfigure - List targets first if unsure what can be built
- Use exact target names from
just list-targetsoutput
Build Output
Build artifacts are located in:
buildDir/- Meson output (NRO/NSP bundles, C objects, ELF files)buildDir/cargo-target/- Rust compilation artifacts
Complete Workflow
Initial setup (first time or clean build):
just list-options # See available options just configure -Duse_nx=enabled # Configure with desired optionsList targets (if unsure):
just list-targetsBuild target:
just build <target-name>Verify build (check for symbol overrides):
/opt/devkitpro/devkitA64/bin/aarch64-none-elf-nm buildDir/path/to/file.elf | rg '__nx_'Deploy (if building NRO):
just deploy buildDir/path/to/file.nro
Reconfiguring
To change build options after initial configuration, use reconfigure:
just reconfigure -Duse_nx=disabled
To clean and start fresh:
just clean-all
just configure -Duse_nx=enabled