Target class final
Represents a Zig cross-compilation target.
Maps between Dart's OS/Architecture and Zig's target triple format.
Constructors
- Target({required String arch, required String os, String? abi, required LinkMode linkMode})
-
Creates a Target with explicit components.
const
- Target.from(Architecture arch, OS os, LinkMode linkMode)
-
Creates a Target from Dart's
OSandArchitecture.factory - Target.fromBuildConfig(BuildConfig buildConfig)
-
Creates a Target from Dart's
BuildConfig.factory
Properties
- abi → String?
-
The ABI (e.g., 'android', 'gnu', 'musl'). May be null.
final
- arch → String
-
The architecture (e.g., 'aarch64', 'x86_64').
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- libraryExtension → String
-
The library file extension for this target.
no setter
- libraryPrefix → String
-
The library file prefix for this target ('lib' or '').
no setter
- linkMode → LinkMode
-
The native linkage mode requested by the Dart build configuration.
final
- os → String
-
The operating system (e.g., 'linux', 'macos', 'windows').
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- triple → String
-
The full target triple string for Zig.
no setter
Methods
-
libraryFileName(
String name) → String - Returns the expected library file name for this target.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited