Skip to main content

The Mojo programming language (compiler only)

Project description

Mojo

Mojo is a systems programming language specifically designed for high-performance AI infrastructure and heterogeneous hardware. Our vision for Mojo is to be the one programming language developers need to target diverse hardware—CPUs, GPUs, and other accelerators—using Python's intuitive syntax combined with modern systems programming capabilities. Of course, Mojo also provides strong interoperability with Python.

NOTE: Not available for Windows.

What's in mojo-compiler

The mojo-compiler package includes the minimal dependencies required to build and run Mojo code, such as the Mojo compiler and standard library. It's smaller than the full mojo package package and it's useful for environments where you only need to execute Mojo code. For example, mojo-compiler is good if you want it just to run Mojo in a production environment or when you're programming in Python and calling into a Mojo package (but not writing new Mojo code).

The mojo-compiler doesn't include the Mojo language server (LSP), LLDB debugger tools, Mojo code formatter, or Mojo REPL. For a complete developer installation, we recommend the mojo package package instead.

Get started with pip

  1. Install Mojo:

    pip install mojo-compiler
    

    If you want the nightly build, instead use:

    pip install --pre mojo-compiler \
      --extra-index-url https://whl.modular.com/nightly/simple/
    
  2. Write some code:

    # hello.mojo
    def main():
      print("Hello, World!")
    
  3. Run the code:

    mojo hello.mojo
    
    Hello, World!
    

Using pip is great for existing Python-based environments, but if you're getting started for the first time, we recommend instead installing with pixi. For more information, see the Mojo install guide.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mojo_compiler-0.26.1.0-py3-none-manylinux_2_34_x86_64.whl (101.5 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ x86-64

mojo_compiler-0.26.1.0-py3-none-manylinux_2_34_aarch64.whl (98.2 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ ARM64

mojo_compiler-0.26.1.0-py3-none-macosx_13_0_arm64.whl (79.4 MB view details)

Uploaded Python 3macOS 13.0+ ARM64

File details

Details for the file mojo_compiler-0.26.1.0-py3-none-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mojo_compiler-0.26.1.0-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ec422c4d41c8886741ae936e4f822bd13528dcbff882bf00dd3d9770f7c4e15b
MD5 1d05042d0743b3adff91ad3b72db918a
BLAKE2b-256 4663ccd9c0b221ff5972db7abfa6b83e2df4e86e40686e7e5047c4963cece7e1

See more details on using hashes here.

File details

Details for the file mojo_compiler-0.26.1.0-py3-none-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for mojo_compiler-0.26.1.0-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 b05128b0251b35d764c1d9ba56f303c02032dfb2d230b493ccae323805a77033
MD5 010a9aeaaf830e8b465399f89cf08d12
BLAKE2b-256 7cd97597cfea6630ceeab57ce4282ba4ad6ad9abf6b8e957e46a1b62164abcda

See more details on using hashes here.

File details

Details for the file mojo_compiler-0.26.1.0-py3-none-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for mojo_compiler-0.26.1.0-py3-none-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 4738027157019e881e7ea481878004cbe500a1f1693ecb4e689fea5d7570c7c4
MD5 2fbdbd692320fb46926e8a53c4349836
BLAKE2b-256 99ead2fa2b1892383c7ffcff2b2c3f35ba5042acf60d9c96c93d2bfcb13662a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page