Target Kinds

Once ships target kinds for supported languages and platforms. Each target kind defines its accepted attributes and dependencies, the providers it emits, and the capabilities it exposes. Its reference page also lists known limitations and a copyable declaration when one is available.

Use once query schema to inspect the same contract from the command line. See Ecosystems for help choosing between typed target kinds and scripted automation.

Each schema reports whether an attribute is required, configurable, and implemented, plus any fixed set of allowed values. An attribute marked as not implemented remains discoverable for compatibility, but validation rejects it with a focused repair before analysis. Tool requirements list the executable alternatives Once can use, so an agent can discover missing setup without reading prose documentation.

Every target kind includes at least one materializable starter. Repository contributors can run mise run examples:verify-portable to materialize and execute the portable starter set against the release command-line interface. Platform-specific starters remain covered by their dedicated toolchain setup and action tests.

Lint target kinds#

See Linting for the shared result and failure-policy contract. Use Custom lint target kinds when the required analyzer is not built in.

Apple target kinds#

Android target kinds#

  • android_resource: Android resources and assets compiled into a static resource package
  • android_library: Android Java library packaged as a Java archive and Android library archive
  • android_local_test: Android Java and Kotlin local tests run on the host Java virtual machine
  • android_instrumentation_test: Android instrumentation tests run on a device or emulator
  • android_binary: Android application package built from Java sources, resources, native libraries, Android resource dependencies, and Android library dependencies

Swift target kinds#

Kotlin target kinds#

Elixir target kinds#

  • mix_workspace: native project seed that derives development, test, production, lint, test, and release targets from mix.exs
  • mix_dependencies: locked Mix and Hex dependency graph imported as independently scheduled packages
  • mix_package: one generated package with locked identity and native Mix or Rebar compilation
  • mix_project: first-party Mix project compiled against separately cached application dependencies
  • mix_release: cacheable Mix release assembled from a compiled first-party project
  • elixir_library: Elixir code compiled into cacheable bytecode with a target-level compiler action
  • elixir_test: ExUnit tests run against an already compiled Elixir application

Python target kinds#

  • pytest_test: pytest suites with exact case execution and automatic file or case batching

Ruby target kinds#

  • rspec_test: Ruby Specification suites with exact example execution and automatic batching
  • minitest_test: Minitest files exposed as independently scheduled units

JavaScript target kinds#

  • vitest_test: Vitest suites with exact case execution and automatic batching
  • jest_test: Jest suites with exact case execution and automatic batching

React Native target kinds#

Rust target kinds#

  • cargo_workspace: native project seed that derives first-party and locked external targets from Cargo.toml
  • cargo_dependencies: cacheable Cargo dependency set consumed by Rust targets
  • rust_library: Rust library artifact consumed by downstream Rust targets, or native static or shared libraries consumed by Apple and Android targets
  • rust_mobile_library: Rust native library materialized by Apple and Android consumers under one target label
  • rust_binary: Rust executable built from a main crate and Rust deps, with build and run capabilities
  • rust_test: Rust test crate compiled with rustc --test and run through Once's test capability
  • rust_crate: resolved third-party Cargo package lowered into a Rust library target
  • rust_proc_macro: Rust procedural macro compiled for Rust targets

Go target kinds#

  • go_dependencies: locked, vendored Go module graph imported as queryable targets
  • go_module: one generated checksum-bound Go module and its complete vendored source tree
  • go_source: reusable Go package sources, embedded files, data, and dependency metadata
  • go_library: Go package archive with cgo, build constraint, sanitizer, coverage, and cross-compilation controls
  • go_binary: runnable Go executable or exported native library
  • go_test: compiled Go tests with exact filtering, normalized results, native events, and coverage

C target kinds#

  • c_library: C and C++ static library provider consumed by native target kinds

CMake target kinds#

  • cmake_project: coarse cacheable CMake configure and build boundary with explicitly declared products
  • cmake_workspace: checked configured graph snapshot imported as queryable targets
  • cmake_target: resolver-generated logical CMake target metadata

Zig target kinds#

  • zig_dependencies: locked Zig package graph imported from build.zig.zon
  • zig_package: one content-identified Zig package lowered into a module provider
  • zig_library: Zig module provider compiled at the use site by downstream Zig targets
  • zig_c_library: Zig module generated from C provider headers
  • zig_binary: Zig executable built from a root module, Zig module dependencies, and C provider dependencies
  • zig_static_library: Zig static library exposed to native linkers
  • zig_shared_library: Zig shared library exposed to native linkers and Android packaging
  • zig_test: Zig test target compiled and run through Once's test capability
  • zig_configure: configured Zig library target using Once-native target attributes
  • zig_configure_binary: configured Zig executable target using Once-native target attributes
  • zig_configure_test: configured Zig test target using Once-native target attributes