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 \
      --index-url https://dl.modular.com/public/nightly/python/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.25.6.1-py3-none-manylinux_2_34_x86_64.whl (100.7 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ x86-64

mojo_compiler-0.25.6.1-py3-none-manylinux_2_34_aarch64.whl (98.7 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ ARM64

mojo_compiler-0.25.6.1-py3-none-macosx_13_0_arm64.whl (77.0 MB view details)

Uploaded Python 3macOS 13.0+ ARM64

File details

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

File metadata

File hashes

Hashes for mojo_compiler-0.25.6.1-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 41867d76c44989637b3c40ad82fe3846e3b686907c2d77917753e717a72f3d72
MD5 d37153c4d742028337fb4eada4d32c57
BLAKE2b-256 7bb90897e480cc816ab1e066f18e6939a36315ff7f948c9c9aeefd65ff395018

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mojo_compiler-0.25.6.1-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 e52009b99312cef99a279e9f65584fea7b584e7c40c5c6be84b6cf805090cb8a
MD5 bc9e5f97d4e477abd87915a02ad34375
BLAKE2b-256 20411644df90bef6e74357280fc424335c30ac2c5e1f977234769dab41922de8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mojo_compiler-0.25.6.1-py3-none-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 29b358ca8f498f984ec4f0e77c5fc7bb2c5c5dd5ee54cefe6b503d7ff0376b7e
MD5 67cf6284a97a7d168de295ca3ea1f2c5
BLAKE2b-256 6ffcb9699e2df93c0b12827f487f9bb174adf23efbf8b407b727b4ceb4e0bb5d

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