Targets

Zig supports generating code for all targets that LLVM supports. Here is what it looks like to execute zig targets on a Linux x86_64 computer:

Shell

  1. $ zig targets
  2. Architectures:
  3. arm
  4. v8_4a
  5. v8_3a
  6. v8_2a
  7. v8_1a
  8. v8
  9. v8r
  10. v8m_baseline
  11. v8m_mainline
  12. v7
  13. v7em
  14. v7m
  15. v7s
  16. v7k
  17. v7ve
  18. v6
  19. v6m
  20. v6k
  21. v6t2
  22. v5
  23. v5te
  24. v4t
  25. armeb
  26. v8_4a
  27. v8_3a
  28. v8_2a
  29. v8_1a
  30. v8
  31. v8r
  32. v8m_baseline
  33. v8m_mainline
  34. v7
  35. v7em
  36. v7m
  37. v7s
  38. v7k
  39. v7ve
  40. v6
  41. v6m
  42. v6k
  43. v6t2
  44. v5
  45. v5te
  46. v4t
  47. aarch64
  48. v8_4a
  49. v8_3a
  50. v8_2a
  51. v8_1a
  52. v8
  53. v8r
  54. v8m_baseline
  55. v8m_mainline
  56. aarch64_be
  57. v8_4a
  58. v8_3a
  59. v8_2a
  60. v8_1a
  61. v8
  62. v8r
  63. v8m_baseline
  64. v8m_mainline
  65. avr
  66. bpfel
  67. bpfeb
  68. hexagon
  69. mips
  70. mipsel
  71. mips64
  72. mips64el
  73. msp430
  74. powerpc
  75. powerpc64
  76. powerpc64le
  77. r600
  78. amdgcn
  79. riscv32
  80. riscv64
  81. sparc
  82. sparcv9
  83. sparcel
  84. s390x
  85. thumb
  86. v8_4a
  87. v8_3a
  88. v8_2a
  89. v8_1a
  90. v8
  91. v8r
  92. v8m_baseline
  93. v8m_mainline
  94. v7
  95. v7em
  96. v7m
  97. v7s
  98. v7k
  99. v7ve
  100. v6
  101. v6m
  102. v6k
  103. v6t2
  104. v5
  105. v5te
  106. v4t
  107. thumbeb
  108. v8_4a
  109. v8_3a
  110. v8_2a
  111. v8_1a
  112. v8
  113. v8r
  114. v8m_baseline
  115. v8m_mainline
  116. v7
  117. v7em
  118. v7m
  119. v7s
  120. v7k
  121. v7ve
  122. v6
  123. v6m
  124. v6k
  125. v6t2
  126. v5
  127. v5te
  128. v4t
  129. i386
  130. x86_64 (native)
  131. xcore
  132. nvptx
  133. nvptx64
  134. lanai
  135. wasm32
  136. wasm64
  137. Operating Systems:
  138. freestanding
  139. ananas
  140. cloudabi
  141. dragonfly
  142. freebsd
  143. fuchsia
  144. ios
  145. kfreebsd
  146. linux (native)
  147. lv2
  148. macos
  149. netbsd
  150. openbsd
  151. solaris
  152. windows
  153. haiku
  154. minix
  155. rtems
  156. nacl
  157. cnk
  158. aix
  159. cuda
  160. nvcl
  161. amdhsa
  162. ps4
  163. elfiamcu
  164. tvos
  165. wasi
  166. watchos
  167. mesa3d
  168. contiki
  169. amdpal
  170. zen
  171. uefi
  172. C ABIs:
  173. none
  174. gnu (native)
  175. gnuabin32
  176. gnuabi64
  177. gnueabi
  178. gnueabihf
  179. gnux32
  180. code16
  181. eabi
  182. eabihf
  183. android
  184. musl
  185. musleabi
  186. musleabihf
  187. msvc
  188. itanium
  189. cygnus
  190. coreclr
  191. simulator
  192. Available libcs:
  193. aarch64_be-linux-gnu
  194. aarch64_be-linux-musl
  195. aarch64-linux-gnu
  196. aarch64-linux-musleabi
  197. armeb-linux-gnueabi
  198. armeb-linux-gnueabihf
  199. armeb-linux-musleabi
  200. armeb-linux-musleabihf
  201. arm-linux-gnueabi
  202. arm-linux-gnueabihf
  203. arm-linux-musleabi
  204. arm-linux-musleabihf
  205. i386-linux-gnu
  206. i386-linux-musl
  207. mips64el-linux-gnuabi64
  208. mips64el-linux-gnuabin32
  209. mips64el-linux-musl
  210. mips64-linux-gnuabi64
  211. mips64-linux-gnuabin32
  212. mips64-linux-musl
  213. mipsel-linux-gnu
  214. mipsel-linux-musl
  215. mips-linux-gnu
  216. mips-linux-musl
  217. nios2-linux-gnu
  218. powerpc64le-linux-gnu
  219. powerpc64le-linux-musl
  220. powerpc64-linux-gnu
  221. powerpc64-linux-musl
  222. powerpc-linux-gnu
  223. powerpc-linux-musl
  224. riscv32-linux-musl
  225. riscv64-linux-gnu
  226. riscv64-linux-musl
  227. s390x-linux-gnu
  228. s390x-linux-musl
  229. sparc-linux-gnu
  230. sparcv9-linux-gnu
  231. wasm32-freestanding-musl
  232. wasm32-wasi-musl
  233. x86_64-linux-gnu
  234. x86_64-linux-gnux32
  235. x86_64-linux-musl

The Zig Standard Library (@import("std")) has architecture, environment, and operating system abstractions, and thus takes additional work to support more platforms. Not all standard library code requires operating system abstractions, however, so things such as generic data structures work on all above platforms.

The current list of targets supported by the Zig Standard Library is:

  • Linux x86_64
  • Windows x86_64
  • macOS x86_64