aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)Author
2021-06-16tagName: return a null-terminated sliceDaniele Cocca
2021-06-15AstGen: support `@export` with field accessAndrew Kelley
The Zig language specification will support identifiers and field access in order to refer to which declaration to export with `@export`. This commit implements the change in AstGen and updates the language reference.
2021-06-13Improve error message when std.fmt.format is missing argumentsJarred Sumner
Use fmt in fmt so the number in the error message is fmt'd
2021-06-12Renamed @byteOffsetOf to @offsetOfExonorid
2021-06-10Documentation TOC item color changedNorberto Martínez
2021-06-09langref: link to 0.7.1 not 0.7.0 for the previous docsAndrew Kelley
2021-06-09langref: remove paragraph that mentions IRCAndrew Kelley
I want the language reference to be divorced from any particular community. Also remove the call to action since the docs are known to be incomplete and are not the current focus of the project. Closes #9055
2021-06-04Release 0.8.00.8.0Andrew Kelley
2021-06-04langref: sync grammar with zig-spec repoIsaac Freund
2021-06-04docs: minor spelling fixviri
2021-06-03Breaking hash map changes for 0.8.0Martin Wickham
- hash/eql functions moved into a Context object - *Context functions pass an explicit context - *Adapted functions pass specialized keys and contexts - new getPtr() function returns a pointer to value - remove functions renamed to fetchRemove - new remove functions return bool - removeAssertDiscard deleted, use assert(remove(...)) instead - Keys and values are stored in separate arrays - Entry is now {*K, *V}, the new KV is {K, V} - BufSet/BufMap functions renamed to match other set/map types - fixed iterating-while-modifying bug in src/link/C.zig
2021-05-25fix position of `.*` and `.?` in operator precedence table documentationMatthew Borkowski
2021-05-24fix position of `orelse` and `catch` in precedence table and remove ↵Matthew Borkowski
misplaced error union operator
2021-05-21wasm: build static archive unless -dynamic specifiedJakub Konka
This matches the behaviour for other targets in that ``` zig build-lib math.zig -target wasm32-freestanding ``` produces now `libmath.a` while ``` zig build-lib math.zig -dynamic -target wasm32-freestanding ``` is required to create a loadable Wasm module.
2021-05-20wasm: link dynamically by default when targeting wasmJakub Konka
This matches the behaviour of other languages and leaves us the ability to create actual static Wasm archives with ``` zig build-lib -static some.zig ``` which can then be combined with other Wasm object files and linked into either a Wasm lib or executable using `wasm-ld`. Update langref to reflect the fact we now ship WASI libc.
2021-05-17update langref, compile-error tests, safety testsAndrew Kelley
for the std.builtin re-arranging
2021-05-08Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: * doc/langref.html.in * lib/std/enums.zig * lib/std/fmt.zig * lib/std/hash/auto_hash.zig * lib/std/math.zig * lib/std/mem.zig * lib/std/meta.zig * test/behavior/alignof.zig * test/behavior/bitcast.zig * test/behavior/bugs/1421.zig * test/behavior/cast.zig * test/behavior/ptrcast.zig * test/behavior/type_info.zig * test/behavior/vector.zig Master branch added `try` to a bunch of testing function calls, and some lines also had changed how to refer to the native architecture and other `@import("builtin")` stuff.
2021-05-08update usage of std.testing in langref.htmlVeikka Tuominen
2021-04-30Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: lib/std/crypto/25519/field.zig lib/std/crypto/poly1305.zig I had resolved those by removing `comptime` but master branch decided to make the parameters `comptime`. This also pulls in the updated default `zig build` install directory.
2021-05-01add doc in `Anonymous Struct Literal` section for special @"0" syntax. (#8630)Devin Bayer
2021-05-01Doc: zig-cache/bin -> zig-out/bin (#8659)Frank Denis
2021-04-24Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
In particular I wanted the change that makes `suspend;` illegal in the parser.
2021-04-24stage1: Require a block after suspendLemonBoy
Closes #8603
2021-04-22delete packed enums from the languageAndrew Kelley
No need for any such thing. Instead, provide an integer tag type for the enum.
2021-04-22langref: add docs for `@extern`Andrew Kelley
2021-04-13Update doc for struct field alignment.Devin Bayer
2021-04-10Fix langref.html anchor navigationCarlos Zúñiga
2021-04-02docgen: correct the progress barAndrew Kelley
It wasn't showing progress for non-code nodes.
2021-04-02docs: document the nosuspend keyword (#7972)Mathieu Guay-Paquet
* docs: document the nosuspend keyword * Specify that resuming from suspend is allowed in nosuspend * Fix the description of the requirements of nosuspend * Make use of nosuspend in some example code. This is mainly motivated by the incorrect claim that "there would be no way to collect the return value of amain, if it were something other than void".
2021-04-02docgen: fix typojacob gw
zig test test.zig-OReleaseFast -> zig test test.zig -OReleaseFast
2021-03-28Remove the base64 unsafe decoderFrank Denis
2021-03-28std/base64: cleanups & support url-safe and other non-padded variantsFrank Denis
This makes a few changes to the base64 codecs. * The padding character is optional. The common "URL-safe" variant, in particular, is generally not used with padding. This is also the case for password hashes, so having this will avoid code duplication with bcrypt, scrypt and other functions. * The URL-safe variant is added. Instead of having individual constants for each parameter of each variant, we are now grouping these in a struct. So, `standard_pad_char` just becomes `standard.pad_char`. * Types are not `snake_case`'d any more. So, `standard_encoder` becomes `standard.Encoder`, as it is a type. * Creating a decoder with ignored characters required the alphabet and padding. Now, `standard.decoderWithIgnore(<ignored chars>)` returns a decoder with the standard parameters and the set of ignored chars. * Whatever applies to `standard.*` obviously also works with `url_safe.*` * the `calcSize()` interface was inconsistent, taking a length in the encoder, and a slice in the encoder. Rename the variant that takes a slice to `calcSizeForSlice()`. * In the decoder with ignored characters, add `calcSizeUpperBound()`, which is more useful than the one that takes a slice in order to size a fixed buffer before we have the data. * Return `error.InvalidCharacter` when the input actually contains characters that are neither padding nor part of the alphabet. If we hit a padding issue (which includes extra bits at the end), consistently return `error.InvalidPadding`. * Don't keep the `char_in_alphabet` array permanently in a decoder; it is only required for sanity checks during initialization. * Tests are unchanged, but now cover both the standard (padded) and the url-safe (non-padded) variants. * Add an error set, rename `OutputTooSmallError` to `NoSpaceLeft` to match the `hex2bin` equivalent.
2021-03-14docgen: Use Progress APILemonBoy
Really slow as usual but now looks slightly better.
2021-03-12langref: Use "single-item pointer" and "many-item pointer" (#8217)Dave Gauer
These terms give short, descriptive names for the two pointer types which reflect the names used in src/type.zig.
2021-03-07docgen --skip-code-testsJosh Wolfe
2021-03-03update docs and grammar to allow CRLF line endings (#8063)Josh Wolfe
2021-02-28langref: Update usage of Thread.spawn()LemonBoy
2021-02-24Merge remote-tracking branch 'origin/master' into ast-memory-layoutAndrew Kelley
2021-02-24Avoid concept of a "Unicode character" in documentation and error messages ↵Josh Wolfe
(#8059)
2021-02-22update docgen to use new astVeikka Tuominen
2021-02-10Convert inline fn to callconv(.Inline) everywhereTadeo Kondrak
2021-02-01docs: Clarify that @field can work on declarationsRyan Liptak
2021-01-30Replace @TagType uses, mostly with std.meta.TagTadeo Kondrak
2021-01-30remove @TagTypeTadeo Kondrak
2021-01-08Remove deprecated stream aliasesJay Petacat
2021-01-07Reduce use of deprecated IO typesJay Petacat
Related: #4917
2021-01-02langref: Update langref to use {s}LemonBoy
2020-12-23Clarify condusing wording regarding `%` and `/`Eleanor Bartle
Previous wording made it seem like any signed or floating-point value would be allowed at comptime, whereas negative values do not work with `%`, and negative integers do not work with `/`.
2020-12-23update depreciated code (#7502)g-w1
* `zig env`: * fix depreciated interface, update outStream -> writer * make code more readable by updating `anytype` -> `std.fs.File.Writer`
2020-12-17Improve documentation for string slices.Josh Holland
Closes #7454.