# \#mojo-compiler

**URL:** https://forum.modular.com/tag/mojo-compiler/9.md

[Latest](https://forum.modular.com/latest.md) · [Categories](https://forum.modular.com/categories.md) · [Tags](https://forum.modular.com/tags.md)

---

## [Gemma 4 26B + Qwen 3.5 27B API serving project](https://forum.modular.com/t/gemma-4-26b-qwen-3-5-27b-api-serving-project/3576)

<div class="topic-metadata">

**Author:** [@0xamlab](https://forum.modular.com/u/0xamlab)\
**Replies:** 2\
**Last updated:** [October 22, 2026, 2:56pm UTC](https://forum.modular.com/t/gemma-4-26b-qwen-3-5-27b-api-serving-project/3576 "2026-10-22T14:56:33Z")

</div>

Hi everyone! A fun project I have been testing and optimizing on NVIDIA RTX Pro 6000 single. See current results above :backhand\_index\_pointing\_up:. Have few items to optimize in next 1-2 days. The end point will be a…

---

## [Bare-metal Mojo on a $4 microcontroller — a pure-Mojo RP2040 firmware + SDK](https://forum.modular.com/t/bare-metal-mojo-on-a-4-microcontroller-a-pure-mojo-rp2040-firmware-sdk/3298)

<div class="topic-metadata">

**Author:** [@Hundo](https://forum.modular.com/u/Hundo)\
**Replies:** 21\
**Last updated:** [October 19, 2026, 10:07pm UTC](https://forum.modular.com/t/bare-metal-mojo-on-a-4-microcontroller-a-pure-mojo-rp2040-firmware-sdk/3298 "2026-10-19T22:07:07Z")

</div>

Mojo is usually pointed at GPUs and AI kernels. I wanted to see how far the other direction goes, so I wrote a bare-metal firmware and peripheral SDK for the Raspberry Pi Pico (RP2040, a dual Cortex-M0+) in pure Mojo — n…

---

## [Clarification on the supported out-of-tree target extension path for Mojo 1.2+](https://forum.modular.com/t/clarification-on-the-supported-out-of-tree-target-extension-path-for-mojo-1-2/3564)

<div class="topic-metadata">

**Author:** [@kting](https://forum.modular.com/u/kting)\
**Replies:** 5\
**Last updated:** [October 15, 2026, 9:26pm UTC](https://forum.modular.com/t/clarification-on-the-supported-out-of-tree-target-extension-path-for-mojo-1-2/3564 "2026-10-15T21:26:54Z")

</div>

Hello, I am experimenting with adding an out-of-tree accelerator target to Mojo and would appreciate clarification on the supported extension path for Mojo 1.2 and later. With the Mojo 1.1.x toolchain, I was able to …

---

## [Does Mojo support cross-compilation for GPU targets on non-GPU platforms?](https://forum.modular.com/t/does-mojo-support-cross-compilation-for-gpu-targets-on-non-gpu-platforms/3465)

<div class="topic-metadata">

**Author:** [@yinghao](https://forum.modular.com/u/yinghao)\
**Replies:** 5\
**Last updated:** [September 8, 2026, 10:15pm UTC](https://forum.modular.com/t/does-mojo-support-cross-compilation-for-gpu-targets-on-non-gpu-platforms/3465 "2026-09-08T22:15:09Z")

</div>

My current local machine doesn’t meet Mojo’s GPU runtime requirements, and I’m currently unable to compile on it. Given that most modern programming languages and compilers support cross-compilation, I was wondering: doe…

---

## [Mojo 1.0 release](https://forum.modular.com/t/mojo-1-0-release/3384)

<div class="topic-metadata">

**Author:** [@matus](https://forum.modular.com/u/matus)\
**Replies:** 0\
**Last updated:** [August 10, 2026, 10:33pm UTC](https://forum.modular.com/t/mojo-1-0-release/3384 "2026-08-10T22:33:13Z")

</div>

Chris Lattner set release date of Mojo 1.0 to 11.8.2026 Ask Us Anything: Modular and Qualcomm

---

## [Pure Mojo Gemma 4 31B Kernel for fun and research](https://forum.modular.com/t/pure-mojo-gemma-4-31b-kernel-for-fun-and-research/3379)

<div class="topic-metadata">

**Author:** [@Adam](https://forum.modular.com/u/Adam)\
**Replies:** 0\
**Last updated:** [August 9, 2026, 2:36am UTC](https://forum.modular.com/t/pure-mojo-gemma-4-31b-kernel-for-fun-and-research/3379 "2026-08-09T02:36:34Z")

</div>

Hi all — I’m a systems engineer most of the time, and I LOVE Mojo. Last year I found myself wanting to understand what’s happening when a model does something it shouldn’t. Gemma-4-31B is a great model, but it will conf…

---

## [Llm.🔥: GPT-2 training in pure Mojo, with hand-written CUDA and Metal GPU kernels](https://forum.modular.com/t/llm-gpt-2-training-in-pure-mojo-with-hand-written-cuda-and-metal-gpu-kernels/3304)

<div class="topic-metadata">

**Author:** [@ulmentflam](https://forum.modular.com/u/ulmentflam)\
**Replies:** 2\
**Last updated:** [July 12, 2026, 6:46pm UTC](https://forum.modular.com/t/llm-gpt-2-training-in-pure-mojo-with-hand-written-cuda-and-metal-gpu-kernels/3304 "2026-07-12T18:46:03Z")

</div>

I ported Andrej Karpathy’s llm.c to Mojo, extending @dorjeduck’s llm.:fire: (written for Mojo 25.5, CPU only) with GPU kernels, in honor of Mojo’s v1.0.0 release. It runs on nightly 1.0.0b3. @dorjeduck showed Mojo could …

---

## [Compiler OOM on DGX Spark GB10 / Unified Memory machines even for 0.5b size models](https://forum.modular.com/t/compiler-oom-on-dgx-spark-gb10-unified-memory-machines-even-for-0-5b-size-models/3264)

<div class="topic-metadata">

**Author:** [@gchauhan](https://forum.modular.com/u/gchauhan)\
**Replies:** 0\
**Last updated:** [June 21, 2026, 11:06pm UTC](https://forum.modular.com/t/compiler-oom-on-dgx-spark-gb10-unified-memory-machines-even-for-0-5b-size-models/3264 "2026-06-21T23:06:39Z")

</div>

On DGX Spark GB10 and Unified memory machines, the default settings for MODULAR\_DEVICE\_CONTEXT\_MEMORY\_MANAGER\_SIZE\_PERCENT=90 result in compiler OOMing even for very small models like Qwen/Qwen2.5-0.5B-Instruct. After s…

---

## [AI-Driven Software Diversity Could Become a Defining Advantage for Mojo](https://forum.modular.com/t/ai-driven-software-diversity-could-become-a-defining-advantage-for-mojo/3097)

<div class="topic-metadata">

**Author:** [@jbemmel](https://forum.modular.com/u/jbemmel)\
**Replies:** 0\
**Last updated:** [May 20, 2026, 11:56am UTC](https://forum.modular.com/t/ai-driven-software-diversity-could-become-a-defining-advantage-for-mojo/3097 "2026-05-20T11:56:12Z")

</div>

Most infrastructure runs on the same kernels, the same allocators, the same memory layouts. That homogeneity is an enormous gift to attackers. A working exploit doesn’t just compromise one system — it scales. The same ch…

---

## [Why didn't the compiler suggest thin? A case for repair-oriented diagnostics in Mojo](https://forum.modular.com/t/why-didnt-the-compiler-suggest-thin-a-case-for-repair-oriented-diagnostics-in-mojo/3053)

<div class="topic-metadata">

**Author:** [@jbemmel](https://forum.modular.com/u/jbemmel)\
**Replies:** 0\
**Last updated:** [May 9, 2026, 4:40pm UTC](https://forum.modular.com/t/why-didnt-the-compiler-suggest-thin-a-case-for-repair-oriented-diagnostics-in-mojo/3053 "2026-05-09T16:40:48Z")

</div>

I’ve been lurking on the closure threads (Mojo Closures 2026, When should thin or unified be used?) and wanted to share something that came up while building a YANG parser. I was trying to store function pointers in a d…

---

## [Matrix struct with Buffer: error at creating](https://forum.modular.com/t/matrix-struct-with-buffer-error-at-creating/2976)

<div class="topic-metadata">

**Author:** [@Bogdan](https://forum.modular.com/u/Bogdan)\
**Replies:** 0\
**Last updated:** [April 17, 2026, 2:39pm UTC](https://forum.modular.com/t/matrix-struct-with-buffer-error-at-creating/2976 "2026-04-17T14:39:33Z")

</div>

Hi, I am experimenting with Mojo 0.26.3 and I got stuck with my code of struct matrix with a buffer. Could you help me what the issue is with it? from std.memory import UnsafePointer comptime RowMajor = "F" comptime C…

---

## [How does Mojo determine what’s allowed at \`comptime\`?](https://forum.modular.com/t/how-does-mojo-determine-what-s-allowed-at-comptime/2902)

<div class="topic-metadata">

**Author:** [@richardkiss](https://forum.modular.com/u/richardkiss)\
**Replies:** 6\
**Last updated:** [March 31, 2026, 9:15am UTC](https://forum.modular.com/t/how-does-mojo-determine-what-s-allowed-at-comptime/2902 "2026-03-31T09:15:28Z")

</div>

It seems the compiler must have some notion of “comptime-safe” operations, with unsafeness propagating up the call graph. Is there any way to determine which library functions are comptime-safe without just trying them …

---

## ["Recursive reference to itself" with Optional and ArcPointer](https://forum.modular.com/t/recursive-reference-to-itself-with-optional-and-arcpointer/2884)

<div class="topic-metadata">

**Author:** [@phomola](https://forum.modular.com/u/phomola)\
**Replies:** 1\
**Last updated:** [March 24, 2026, 1:46pm UTC](https://forum.modular.com/t/recursive-reference-to-itself-with-optional-and-arcpointer/2884 "2026-03-24T13:46:38Z")

</div>

Hello, I have the following struct: struct S(Movable): var x: Optional\[ArcPointer\[S\]\] The code doesn’t compile, the error message is: “struct has recursive reference to itself“ Am I overlooking something? The foll…

---

## [Proposal: change \`mojo run\` argument handling](https://forum.modular.com/t/proposal-change-mojo-run-argument-handling/2639)

<div class="topic-metadata">

**Author:** [@fcormack](https://forum.modular.com/u/fcormack)\
**Replies:** 6\
**Last updated:** [February 6, 2026, 2:49pm UTC](https://forum.modular.com/t/proposal-change-mojo-run-argument-handling/2639 "2026-02-06T14:49:37Z")

</div>

Hi, I’m Fraser and I work on the compiler team. I’d like to propose a small change to how mojo run (and mojo debug) handle the split between compiler and program arguments. I’m looking for community feedback and whether…

---

## [Turning off one warning, not all?](https://forum.modular.com/t/turning-off-one-warning-not-all/2662)

<div class="topic-metadata">

**Author:** [@stu002](https://forum.modular.com/u/stu002)\
**Replies:** 2\
**Last updated:** [February 3, 2026, 9:10pm UTC](https://forum.modular.com/t/turning-off-one-warning-not-all/2662 "2026-02-03T21:10:23Z")

</div>

I don’t think this is currently possible with the Mojo compiler, but I’d like to be able to turn off just one warning, but keep all the others. The warning relates to docstrings that end in a question mark, which for pr…

---

## [Making a struct Writable](https://forum.modular.com/t/making-a-struct-writable/2665)

<div class="topic-metadata">

**Author:** [@stu002](https://forum.modular.com/u/stu002)\
**Replies:** 2\
**Last updated:** [February 1, 2026, 9:17pm UTC](https://forum.modular.com/t/making-a-struct-writable/2665 "2026-02-01T21:17:17Z")

</div>

I have a vector struct: struct Vector(Writable): var x: Float64 var y: Float64 #... fn write\_to(self, mut writer: Some\[Writer\]): writer.write("(", self.x, ", ", self.y, ")") Whether I include the write…

---

## [Mojo systems security](https://forum.modular.com/t/mojo-systems-security/2618)

<div class="topic-metadata">

**Author:** [@trojan\_x](https://forum.modular.com/u/trojan_x)\
**Replies:** 0\
**Last updated:** [January 19, 2026, 7:02pm UTC](https://forum.modular.com/t/mojo-systems-security/2618 "2026-01-19T19:02:07Z")

</div>

In the context of Artificial intelligence I would like to implement high level intelligence under the focus of using Mojo as an autonomous cyber defense logic to which can scan malicious packets and flag autonomously. I …

---

## [Curious why the Mojo compiler makes a network request during/after compilation](https://forum.modular.com/t/curious-why-the-mojo-compiler-makes-a-network-request-during-after-compilation/2422)

<div class="topic-metadata">

**Author:** [@suvash](https://forum.modular.com/u/suvash)\
**Replies:** 2\
**Last updated:** [November 5, 2025, 9:01pm UTC](https://forum.modular.com/t/curious-why-the-mojo-compiler-makes-a-network-request-during-after-compilation/2422 "2025-11-05T21:01:33Z")

</div>

Hi, It’s been a long while since I first used Mojo (wrote conway’s life via the playground a while back). Today I downloaded the Mojo compiler using Pixi and test ran the hello world once again. Hats off to the team, …

---

## [Mojo LSP Setup for NeoVim](https://forum.modular.com/t/mojo-lsp-setup-for-neovim/501)

<div class="topic-metadata">

**Author:** [@Codu](https://forum.modular.com/u/Codu)\
**Replies:** 5\
**Last updated:** [November 4, 2025, 6:42am UTC](https://forum.modular.com/t/mojo-lsp-setup-for-neovim/501 "2025-11-04T06:42:33Z")

</div>

Hey all! As I have been preparing to dive into Mojo, I have had trouble finding a definitive guide on setting up the LSP and syntax highlighting for Mojo in Neovim, or any other editor for that matter. I think this wou…

---

## [Error: failed to run the pass manager for offload functions](https://forum.modular.com/t/error-failed-to-run-the-pass-manager-for-offload-functions/2326)

<div class="topic-metadata">

**Author:** [@Pip](https://forum.modular.com/u/Pip)\
**Replies:** 3\
**Last updated:** [October 4, 2025, 2:00am UTC](https://forum.modular.com/t/error-failed-to-run-the-pass-manager-for-offload-functions/2326 "2025-10-04T02:00:39Z")

</div>

Hi, I’m learning Mojo using a MacBook pro with M1 and working my way through the examples. I’ve just started this one; Get started with GPU programming | Modular (pretty basic I know!) The first step works fine: mojo…

---

## [Calling c functions with larger structs by value fails](https://forum.modular.com/t/calling-c-functions-with-larger-structs-by-value-fails/655)

<div class="topic-metadata">

**Author:** [@sbrunk](https://forum.modular.com/u/sbrunk)\
**Replies:** 7\
**Last updated:** [September 28, 2025, 5:16pm UTC](https://forum.modular.com/t/calling-c-functions-with-larger-structs-by-value-fails/655 "2025-09-28T17:16:28Z")

</div>

Here’s a minimized example of an issue I ran into, while working on the DuckDB Mojo bindings. I have a c function that expects to be called by value with a struct containing more than 2 elements. Using DLHandle.call, it…

---

## [Mojo now available in Conda as a standalone package](https://forum.modular.com/t/mojo-now-available-in-conda-as-a-standalone-package/2052)

<div class="topic-metadata">

**Author:** [@BradLarson](https://forum.modular.com/u/BradLarson)\
**Replies:** 2\
**Last updated:** [September 22, 2025, 6:04pm UTC](https://forum.modular.com/t/mojo-now-available-in-conda-as-a-standalone-package/2052 "2025-09-22T18:04:38Z")

</div>

You’re going to see a significant change in our Pixi / Conda packages in the latest nightlies and next stable release: Mojo is going to be available in its own package! This package includes everything needed for doing M…

---

## [Unexpected argument mutation with \`mojo test\` — not under \`mojo run\`](https://forum.modular.com/t/unexpected-argument-mutation-with-mojo-test-not-under-mojo-run/2203)

<div class="topic-metadata">

**Author:** [@moseschmiedel](https://forum.modular.com/u/moseschmiedel)\
**Replies:** 2\
**Last updated:** [September 19, 2025, 7:09pm UTC](https://forum.modular.com/t/unexpected-argument-mutation-with-mojo-test-not-under-mojo-run/2203 "2025-09-19T19:09:43Z")

</div>

DISCLAIMER: I know that this looks a bit like a bug report, but as far as I can tell it isn’t (yet). Therefore I am posting it here on the forum, because my intention is to first discuss and investigate the problem furt…

---

## [Error: unable to locate module 'comm'](https://forum.modular.com/t/error-unable-to-locate-module-comm/2270)

<div class="topic-metadata">

**Author:** [@steepcurve](https://forum.modular.com/u/steepcurve)\
**Replies:** 1\
**Last updated:** [September 15, 2025, 4:13pm UTC](https://forum.modular.com/t/error-unable-to-locate-module-comm/2270 "2025-09-15T16:13:35Z")

</div>

I want to test the Mojo kernel on my Mac. I’m using the pixi environment with Mojo version 0.25.6.0.dev2025091505 (9595273d). When I run the command pixi run mojo -I ~/git-ws/mojo\_ws/modular/max/kernels/ ~/git-ws/mojo\_ws…

---

## [Cannot append list to list of lists](https://forum.modular.com/t/cannot-append-list-to-list-of-lists/2259)

<div class="topic-metadata">

**Author:** [@antonl2219](https://forum.modular.com/u/antonl2219)\
**Replies:** 2\
**Last updated:** [September 13, 2025, 10:46am UTC](https://forum.modular.com/t/cannot-append-list-to-list-of-lists/2259 "2025-09-13T10:46:58Z")

</div>

Hello, This bit of code var a=List\[List\[Float64\]\](\[1.0, 2.0, 3.0\]) var b=List\[Float64\](22, 33, 44) a.append(b) fails with Mojo 0.25.6.0.dev2025091105 (07937a3a) /workspace/JTC/tmp/t1.mojo:5:12: error: ‘List\[Float64…

---

## [Mojo Global Access](https://forum.modular.com/t/mojo-global-access/2218)

<div class="topic-metadata">

**Author:** [@melih](https://forum.modular.com/u/melih)\
**Replies:** 3\
**Last updated:** [September 4, 2025, 7:07pm UTC](https://forum.modular.com/t/mojo-global-access/2218 "2025-09-04T19:07:15Z")

</div>

Hi everyone. Can I run Mojo on my computer directly, like Node.js or Go, without installing modules into any folder? I want to install Mojo globally on my computer, but I think the Mojo CLI isn’t working, and the docume…

---

## [Improve Multi-Phase Design, Comptime, and Debugging Experience](https://forum.modular.com/t/improve-multi-phase-design-comptime-and-debugging-experience/2192)

<div class="topic-metadata">

**Author:** [@Hundo](https://forum.modular.com/u/Hundo)\
**Replies:** 0\
**Last updated:** [August 27, 2025, 3:29am UTC](https://forum.modular.com/t/improve-multi-phase-design-comptime-and-debugging-experience/2192 "2025-08-27T03:29:07Z")

</div>

Hello Mojician! After playing with Mojo for a while, I noticed that after pushing my program from runtime into comptime more often, it becomes more abstract and faster. I mean, it works really well, but as a beginner an…

---

## [Proposal: compile\_function and enqueue\_function need to become checked](https://forum.modular.com/t/proposal-compile-function-and-enqueue-function-need-to-become-checked/2114)

<div class="topic-metadata">

**Author:** [@laranzu](https://forum.modular.com/u/laranzu)\
**Replies:** 1\
**Last updated:** [August 12, 2025, 4:11pm UTC](https://forum.modular.com/t/proposal-compile-function-and-enqueue-function-need-to-become-checked/2114 "2025-08-12T16:11:52Z")

</div>

I would like to see compile\_function\_checkedand enqueue\_function\_checkedbe marked as “deprecated” because compile\_function and enqueue\_function will implement the same functionality in some future version. (BUT, for the …

---

## [How to obtain the date (or datetime) from local machine using pure Mojo?](https://forum.modular.com/t/how-to-obtain-the-date-or-datetime-from-local-machine-using-pure-mojo/2051)

<div class="topic-metadata">

**Author:** [@EzRyder](https://forum.modular.com/u/EzRyder)\
**Replies:** 2\
**Last updated:** [July 31, 2025, 4:08pm UTC](https://forum.modular.com/t/how-to-obtain-the-date-or-datetime-from-local-machine-using-pure-mojo/2051 "2025-07-31T16:08:41Z")

</div>

What’s the standard way to obtain the date or datetime from the local machine using pure Mojo? I don’t see it from a quick search of the online docs, nor could kapa.ai provide a code example. Thanks!

---

## [CombustUI – GUI Bindings for Mojo](https://forum.modular.com/t/combustui-gui-bindings-for-mojo/573)

<div class="topic-metadata">

**Author:** [@HammadHAB](https://forum.modular.com/u/HammadHAB)\
**Replies:** 7\
**Last updated:** [July 30, 2025, 6:59am UTC](https://forum.modular.com/t/combustui-gui-bindings-for-mojo/573 "2025-07-30T06:59:06Z")

</div>

CombustUI (WIP) is a GUI library for Mojo, built on top of FLTK (Fast Light Toolkit) from C++. It provides low-level control by directly calling FLTK functions. Currently, CombustUI is in its early stages, offering basic…

[Next page](https://forum.modular.com/tag/mojo-compiler/9.md?match_all_tags=true&page=1&tags%5B%5D=mojo-compiler)
