[REQUEST]: Add Mojo examples and targets that demonstrate its non-CPU abilities

Author: hippietrailCreated Sep 15, 2026Updated Sep 15, 2026
Labelsrequest

Is your feature request related to a problem? Please describe

Mojo can compile to CPUs and also more exotic targets. But only the square program compiling to x86 is available to browse.

Describe the solution you'd like

  1. Add example programs that do more interesting things that would make use of more exotic targets.
  2. Add such exotic targets to the dropdown.

I can see 1. only requires adding examples to https://github.com/compiler-explorer/compiler-explorer/tree/main/examples/mojo

I haven't figured out how to achieve 2. yet.

Describe alternatives you've considered

Entering custom code examples and custom targets. For people curious about what Mojo can do but not knowledgeable about Mojo this is a challenge.

For instance I can manually set --target-accelerator=sm_90 by reading the Mojo docs: https://mojolang.org/docs/tools/compilation/

But as a noob to this domain I'd need to know a sample program and build target that together would produce something interesting. This would require somebody who knows how to use Mojo properly

Additional context

YouTube video recommending using Godbolt or this purpose: https://www.youtube.com/watch?v=a7YdrWOfi7o&t=744s

Source: compiler-explorer/compiler-explorer