Cargo features
The neo crate's cargo features: the profiles and collections, which features NEO's builds turn on, and the optional ones you can add.
On this page
The neo crate is split into cargo features, so a build only compiles the parts it uses. Its default features give you the full engine for 2D, 3D, UI and audio. You can turn on more, or start from nothing and pick, for example for a headless server.
What NEO's builds use#
NEO's games, the Studio and the samples all build neo with its default features, plus:
| Feature | Why |
|---|---|
system_font_discovery | Text can use the fonts installed on the system. |
mesh_picking | Pointer picking against 3D meshes (already part of the defaults' picking). |
android-native-activity | Android builds only: the game runs as a NativeActivity. |
When a page in this guide says a feature "isn't on in NEO's builds", it means it's outside this set and you have to add it yourself.
Profiles#
Profiles are the high-level groups. The default is all four:
| Profile | What it gives you |
|---|---|
2d | The core app, 2D rendering (sprites, 2D meshes, text), scenes and picking. |
3d | The core app, 3D rendering (PBR, lights, glTF, post-processing, anti-aliasing), scenes and picking. |
ui | The core app, NEO UI and its renderer, the headless widgets, scenes and picking. |
audio | Audio playback with Ogg Vorbis. |
To build less, turn the defaults off and list what you need:
[dependencies]
neo = { workspace = true, default-features = false, features = ["2d"] }Collections#
Collections are the mid-level groups the profiles are made of. Use them to build your own profile.
| Collection | What's in it |
|---|---|
default_app | The pieces almost every app needs, with no rendering: async tasks, assets, logging, states and automatic reflection registration. A good base for servers and command-line tools. |
default_platform | Platform support: std, gamepads, windowing and input (winit), the clipboard, the default font, multithreading, WebGL 2, X11 and Wayland, custom cursors and system information diagnostics. |
common_api | Scene types without a renderer: animation, cameras, colours, curves, gizmos, images, meshes, shaders, materials, text, windows, and HDR and PNG images. |
2d_api, 2d_neo_render | 2D types (sprites), then the built-in 2D renderer. |
3d_api, 3d_neo_render | 3D types (lights, tangents, KTX2, morph targets, SMAA and tonemapping lookup tables), then the built-in 3D renderer (PBR, glTF, anti-aliasing, post-processing). |
ui_api, ui_neo_render | UI and input focus, then the UI renderer. |
scene | Scenes and world serialization. |
picking | Picking with all three backends: meshes, sprites and UI. |
dev | Development helpers: debug names, the developer tools, render debug tools and asset hot reload. Not for published games. |
audio-all-formats | Audio with AAC, FLAC, MP3, MP4, Vorbis and WAV. |
default_no_std | A starting point for no_std targets. |
Optional features#
These are off in NEO's builds. Add the ones you need to your game crate's neo dependency, or try one for a single run with --features neo/<name>.
Development#
| Feature | What it adds |
|---|---|
file_watcher | Reloads assets when their files change. See Hot reload. |
dynamic_linking | Builds the engine as a shared library, for faster relinking during development. Not for packaged builds. |
neo_dev_tools | The developer tools, such as the FPS overlay. See Developer tools. |
debug | Keeps the names of systems and components for diagnostics and profilers. |
track_location | Records where in your code each entity was spawned and each component changed. |
neo_remote | The remote protocol, to inspect and edit a running app from another program. See Remote protocol. |
neo_ui_debug | An overlay that outlines UI nodes. |
trace, trace_tracy, trace_chrome | Profiling spans, for Tracy or Chrome's trace viewer. See Profiling. |
Assets and formats#
| Feature | What it adds |
|---|---|
jpeg, bmp, gif, webp, tga, tiff, exr, qoi, dds, basis-universal | More image formats. Only PNG, HDR and KTX2 are on by default. |
wav, mp3, flac, aac, mp4 | More audio formats. Only Ogg Vorbis is on by default. |
asset_processor | The asset processor, which prepares assets ahead of time. See Asset processing. |
http, https | Loading assets from web addresses. Think about what you allow before you turn it on. |
serialize | serde support on the engine's types. |
neo_settings | Loading and saving settings. |
Rendering#
| Feature | What it adds |
|---|---|
pbr_transmission_textures, pbr_specular_textures, pbr_anisotropy_texture, pbr_multi_layer_material_textures | More texture slots on StandardMaterial. They can exceed the texture limit on older GPUs. |
pbr_clustered_decals, pbr_light_textures | Decals and light textures. |
experimental_pbr_pcss | Soft shadows (PCSS). |
area_light_luts, dfg_lut, bluenoise_texture | Lookup tables some lighting features need. |
meshlet | A renderer for dense, high-polygon scenes. Experimental. |
neo_solari | Ray-traced lighting. Experimental, and needs a GPU with ray queries. |
webgpu | WebGPU in the browser instead of WebGL 2. NEO's web builds use WebGL 2. |
gles | A native OpenGL or GLES backend, for GPUs without Vulkan. Not for the web. |
statically-linked-dxc | Links the DirectX 12 shader compiler into the game. NEO's packaged Windows builds do this. |
Other#
| Feature | What it adds |
|---|---|
neo_camera_controller, free_camera, pan_camera | Ready-made camera controllers. NEO games use the camera director instead. |
neo_feathers, neo_inspector | A styled widget set and an entity inspector built with it. |
system_clipboard | The operating system's clipboard. |
reflect_functions, reflect_documentation | Calling functions through reflection, and doc comments at runtime. |
multi_threaded is on by default (in default_platform). Without it, everything runs on one thread, as it does in the browser.
A headless app#
A server or tool with no window or renderer needs only the core:
neo = { workspace = true, default-features = false, features = ["default_app"] }See The App for the code.