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:

  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. watchos
  166. mesa3d
  167. contiki
  168. amdpal
  169. zen
  170. uefi
  171. C ABIs:
  172. none
  173. gnu (native)
  174. gnuabin32
  175. gnuabi64
  176. gnueabi
  177. gnueabihf
  178. gnux32
  179. code16
  180. eabi
  181. eabihf
  182. android
  183. musl
  184. musleabi
  185. musleabihf
  186. msvc
  187. itanium
  188. cygnus
  189. coreclr
  190. simulator
  191. Available libcs:
  192. aarch64_be-linux-gnu
  193. aarch64_be-linux-musl
  194. aarch64-linux-gnu
  195. aarch64-linux-musleabi
  196. armeb-linux-gnueabi
  197. armeb-linux-gnueabihf
  198. armeb-linux-musleabi
  199. armeb-linux-musleabihf
  200. arm-linux-gnueabi
  201. arm-linux-gnueabihf
  202. arm-linux-musleabi
  203. arm-linux-musleabihf
  204. i386-linux-gnu
  205. i386-linux-musl
  206. mips64el-linux-gnuabi64
  207. mips64el-linux-gnuabin32
  208. mips64el-linux-musl
  209. mips64-linux-gnuabi64
  210. mips64-linux-gnuabin32
  211. mips64-linux-musl
  212. mipsel-linux-gnu
  213. mipsel-linux-musl
  214. mips-linux-gnu
  215. mips-linux-musl
  216. nios2-linux-gnu
  217. powerpc64le-linux-gnu
  218. powerpc64le-linux-musl
  219. powerpc64-linux-gnu
  220. powerpc64-linux-musl
  221. powerpc-linux-gnu
  222. powerpc-linux-musl
  223. riscv32-linux-musl
  224. riscv64-linux-gnu
  225. riscv64-linux-musl
  226. s390x-linux-gnu
  227. s390x-linux-musl
  228. sparc-linux-gnu
  229. sparcv9-linux-gnu
  230. wasm32-freestanding-musl
  231. x86_64-linux-gnu
  232. x86_64-linux-gnux32
  233. 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