authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-04-24 17:04:52-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-04-24 17:04:52-04:00
log05198e03216c18ca1df089b7d06717dd00731ed4
treeaabd6b93d00af4820d5d655fdbbf0d8aeea22ad0
parentd72fb2abadda831e5877549eb9f5ae36c355d05f

readme update


1 files changed, 14 insertions(+), 41 deletions(-)

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