This talk explains how Mojo, a new programming language, leverages MLIR to create a powerful compile-time metaprogramming system designed for heterogeneous computing. The language uses high-level features like traits and dependent types to build robust, type-safe abstractions that can target diverse hardware from a single programming model. The core of the implementation involves a parametric IR built on MLIR, where MLIR's attribute system is used to represent the parameters in Mojo's polymorphic system. This design, which makes both operations and types parameterizable, allows for the efficient specialization of generic code while ensuring type safety throughout the compilation process. The presentation will share practical insights and patterns learned during development to help other language implementers working with MLIR.