# Where do I read @ builtins?

**URL:** <https://ziggit.dev/t/where-do-i-read-builtins/17626>\
**Category:** Help\
**Tags:** language\
**Created:** [September 16, 2026, 7:33pm UTC](https://ziggit.dev/t/where-do-i-read-builtins/17626 "2026-09-16T19:33:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dennypenta](https://ziggit.dev/user_avatar/ziggit.dev/dennypenta/32/8587_2.png) [@dennypenta](https://ziggit.dev/u/dennypenta)\
**Post date:** [September 16, 2026, 7:33pm UTC](https://ziggit.dev/t/where-do-i-read-builtins/17626/1 "2026-09-16T19:33:18Z")

</div>

I want to know how do I find source for those functions to read them since LSP doesn’t go into it

---

<div class="post-metadata">

**Author:** ![gert](https://ziggit.dev/user_avatar/ziggit.dev/gert/32/8060_2.png) [@gert](https://ziggit.dev/u/gert)\
**Post date:** [September 16, 2026, 7:58pm UTC](https://ziggit.dev/t/where-do-i-read-builtins/17626/3 "2026-09-16T19:58:25Z")

</div>

I only know of the builtin functions be listed online, or in your installed zig directory under `doc/langref.html`

> **[Builtin Functions - Documentation - The Zig Programming Language](https://ziglang.org/documentation/0.16.0/#Builtin-Functions)**
>
> Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

---

<div class="post-metadata">

**Author:** ![ScottRedig](https://ziggit.dev/user_avatar/ziggit.dev/scottredig/32/5880_2.png) [@ScottRedig](https://ziggit.dev/u/ScottRedig)\
**Post date:** [September 16, 2026, 8:04pm UTC](https://ziggit.dev/t/where-do-i-read-builtins/17626/4 "2026-09-16T20:04:14Z")

</div>

This is a common question. The builtin functions aren’t functions, per se. Instead they’re essentially just language syntax which looks like function calls. So for example how `@addWithOverflow` works is a lot like how `+` works, it’s the compiler outputting machine code. Other builtins are implemented in different parts across the compiler. This is why some builtins get away with special syntax rules that typical functions don’t, such as `@min` being varargs, or `@import` only taking string literals. So if you really want to dive into things, you need to dive into the compiler. The language reference covers most of what anyone will ever need to know.

---

<div class="post-metadata">

**Author:** ![vincentd](https://ziggit.dev/user_avatar/ziggit.dev/vincentd/32/9870_2.png) [@vincentd](https://ziggit.dev/u/vincentd)\
**Post date:** [September 17, 2026, 4:53am UTC](https://ziggit.dev/t/where-do-i-read-builtins/17626/5 "2026-09-17T04:53:53Z")

</div>

@builtin functions exist for one of two reasons:

1. They do something that _cannot_ be expressed with regular zig code alone:
  - `@import()`
  - `@This()`
  - `@Vector()`

2. They do a simple operation, that can be lowered to 0 or 1 instructions on most targets, but does not justify having a dedicated symbol (+ - \* /). Having them as a `@builtin` is easier for the compiler to process than if they were in the standard library.
  - `@ctz()`
  - `@atomicStore()`
  - `@truncate()`

They don’t have source code, in the same way that `=` and `const` don’t have source code.

If you want to know more about how they work under the hood, I suggest compiling test programs and inspecting the assembly code they produce.
