|
3 | 3 | A system programming language which prioritizes optimality, safety, and
|
4 | 4 | readability.
|
5 | 5 |
|
6 |
| -Zig is a small language, yet powerful enough to solve any computing problem. |
| 6 | +Zig is a small, simple language, yet powerful. Zig fits into the same niche |
| 7 | +as C, except does everything better. |
7 | 8 |
|
8 |
| -Zig intends to replace C. Therefore, porting a C project to Zig should be a |
9 |
| -pleasant experience. For every use case C can solve, the same use case must |
10 |
| -be handled in Zig in an equally or more satisfying way. |
11 |
| - |
12 |
| -Zig is not afraid to roll the major version number of the language if it |
13 |
| -improves simplicity, fixes poor design decisions, or adds a new feature which |
14 |
| -compromises backward compatibility. |
| 9 | +Zig ships with a build system that obviates the need for a configure script |
| 10 | +or a makefile. In fact, existing C and C++ projects may choose to depend on |
| 11 | +Zig instead of e.g. cmake. |
15 | 12 |
|
16 | 13 | [ziglang.org](http://ziglang.org)
|
17 | 14 |
|
18 |
| -## Existing Features |
| 15 | +## Feature Highlights |
19 | 16 |
|
20 | 17 | * Compatible with C libraries with no wrapper necessary. Directly include
|
21 | 18 | C .h files and get access to the functions and symbols therein.
|
@@ -45,24 +42,19 @@ compromises backward compatibility.
|
45 | 42 | * Release mode produces heavily optimized code. What other projects call
|
46 | 43 | "Link Time Optimization" Zig does automatically.
|
47 | 44 | * Mark functions as tests and automatically run them with `zig test`.
|
48 |
| - * Currently supported architectures: `x86_64` |
49 |
| - * Currently supported operating systems: linux |
50 | 45 | * Friendly toward package maintainers. Reproducible build, bootstrapping
|
51 | 46 | process carefully documented. Issues filed by package maintainers are
|
52 | 47 | considered especially important.
|
53 |
| - * Easy cross-compiling. |
54 |
| - |
55 |
| -## Planned Features |
56 |
| - |
| 48 | + * Cross-compiling is a primary use case. |
| 49 | + * Zig Build System competes with make, cmake, autotools, SCons, etc. |
57 | 50 | * In addition to creating executables, creating a C library is a primary use
|
58 | 51 | case. You can export an auto-generated .h file.
|
59 |
| - * Eliminate the need for configure, make, cmake, etc. |
60 |
| - * Automatically provide test coverage. |
61 |
| - * Ability to declare dependencies as Git URLS with commit locking (can |
62 |
| - provide a tag or sha256). |
63 |
| - * Include documentation generator. |
64 |
| - * Compiler exposes itself as a library. |
65 |
| - * Support for all popular architectures and operating systems. |
| 52 | + * Currently supported architectures: |
| 53 | + * `x86_64` |
| 54 | + * Currently supported operating systems: |
| 55 | + * `linux` |
| 56 | + * `freestanding` |
| 57 | + * Support for all popular operating systems and architectures is planned. |
66 | 58 |
|
67 | 59 | ## Community
|
68 | 60 |
|
@@ -135,25 +127,6 @@ the last step will fail, but you can execute
|
135 | 127 | `llvm-cov gcov $(find CMakeFiles/ -name "*.gcda")` and then inspect the
|
136 | 128 | produced .gcov files.
|
137 | 129 |
|
138 |
| -### Troubleshooting |
139 |
| - |
140 |
| -If you get one of these: |
141 |
| - |
142 |
| -``` |
143 |
| -undefined reference to `_ZNK4llvm17SubtargetFeatures9getStringB5cxx11Ev' |
144 |
| -undefined reference to `llvm::SubtargetFeatures::getString() const' |
145 |
| -``` |
146 |
| - |
147 |
| -This is because of |
148 |
| -[C++'s Dual ABI](https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html). |
149 |
| -Most likely LLVM was compiled with one compiler while Zig was compiled with a |
150 |
| -different one, for example GCC vs clang. |
151 |
| - |
152 |
| -To fix this, you have 2 options: |
153 |
| - |
154 |
| - * Compile Zig with the same compiler that LLVM was compiled with. |
155 |
| - * Add `-DZIG_LLVM_OLD_CXX_ABI=yes` to the cmake configure line. |
156 |
| - |
157 | 130 | ### Related Projects
|
158 | 131 |
|
159 | 132 | * [zig-mode](https://github.com/AndreaOrru/zig-mode) - Emacs integration
|
|
0 commit comments