# Targets

> Which instruction sets and operating systems Lane builds for, their executable formats, SIMD and how parity is tested.

Every target gets ahead-of-time native code: no VM and no JIT. The ext declaration gives every target a C ABI in both directions, so Lane code can link into an existing app or engine. The order and timing of the targets are on the roadmap.

| Target | Executable format | SIMD | How parity is tested |
|---|---|---|---|
| x86-64 Windows | PE executable, and DLL for library output. | AVX2 (8 f32 lanes) and AVX-512 (16 lanes). | The reference target: the 1668 test programs are built and run on it, and the expected stdout and exit codes are those of this target. |
| x86-64 Linux | ELF: a static executable with no interpreter and no C library, built with --target linux. | As x86-64 Windows. | The test programs are built for this target, run on Linux, and their stdout and exit codes are compared with the same expected bytes (the exit status modulo 256). |
| AArch64: macOS, iOS, Linux, Android, Windows | Android: ELF shared library. iOS: a Mach-O object, linked and signed by Xcode. Linux: a static ELF executable with no C library, built with --target linux-arm64. macOS: a Mach-O executable with an ad-hoc signature, built with --target macos-arm64. Windows: not specified. The roadmap has the state of each. | NEON (4 f32 lanes). | The same test programs built for this target and checked against the same expected bytes. |
| WebAssembly: wasm32 and wasm64, with SIMD128 | A wasm module (32-bit or 64-bit memory), a generated JavaScript loader and an HTML page (lane build --target web). Browser APIs are reached as ext imports. Lane does not compile to JavaScript source. | SIMD128 (4 f32 lanes), for both pointer widths. | The same test programs, with the same expected bytes, run under node and under wasmtime, for both pointer widths. |
| RISC-V 64 with RVV | Linux: a static ELF executable with no C library. The roadmap has the state. | RVV, the RISC-V vector extension. | The same test programs, with the same expected bytes. |
| SPIR-V | SPIR-V modules, from a pure subset: no pointers, function pointers, asm, par or recursion. | Compute shaders: vec loops over soa data are expressible as compute shaders. | Shader functions are testable on the CPU against the same expected values. |
| 32-bit targets | Not specified. | Not specified. | The same test programs, with the same expected bytes. |

Parity between targets is checked by building the same test programs for every target and comparing the program's output and exit code with the same expected bytes. Float code is strict by default, so results are bit-identical on every target (section 8.3 of the specification).
