# Emit "monomorphized" zig code

**URL:** <https://ziggit.dev/t/emit-monomorphized-zig-code/2657>\
**Category:** Help\
**Tags:** comptime, compiler\
**Created:** [December 31, 2023, 8:07pm UTC](https://ziggit.dev/t/emit-monomorphized-zig-code/2657 "2023-12-31T20:07:57Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Brysen](https://ziggit.dev/user_avatar/ziggit.dev/brysen/32/1419_2.png) [@Brysen](https://ziggit.dev/u/Brysen)\
**Post date:** [December 31, 2023, 8:07pm UTC](https://ziggit.dev/t/emit-monomorphized-zig-code/2657/1 "2023-12-31T20:07:58Z")

</div>

Hello, the title probably doesn’t make much sense as I don’t think zig calls it monomorphization. Lately I’ve been playing around with comptime (really enjoying this take on metaprogramming). I don’t understand the inner workings of the compiler yet, but I’m guessing there is a step for interpreting the compile-time parts of a Zig program and emitting the “monomorphized” version of it? If so is it possible to look at the code during this compilation step, ie. a compile option for `zig build-obj`? Something like this could help a lot with learning, as you get to see what your comptime code gets turned into .

I did look through the options for the compiler, and you can obviously emit assembly and llvm-ir, but I don’t think I found anything for zig-specifc intermediate representations you’d get further up the pipeline (I may be blind though). Thanks in advance, and happy new year.

---

_[View the full topic](https://ziggit.dev/t/emit-monomorphized-zig-code/2657)._
