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-1.0.0b1-py3-none-manylinux_2_34_x86_64.whl (94.9 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ x86-64

mojo_compiler-1.0.0b1-py3-none-manylinux_2_34_aarch64.whl (90.1 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ ARM64

mojo_compiler-1.0.0b1-py3-none-macosx_13_0_arm64.whl (69.5 MB view details)

Uploaded Python 3macOS 13.0+ ARM64

File details

Details for the file mojo_compiler-1.0.0b1-py3-none-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mojo_compiler-1.0.0b1-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 44ad5acdd1e52bfa0d3c45ddc552b5200f36956b25b8ae2e4f25dc1e70937a7d
MD5 23827b3bbbefb2d1c1eb91f0cc0e213e
BLAKE2b-256 57653292b19e928e6b6e7ae8ce91266c44ee19df094b37e3b98e1679368780e1

See more details on using hashes here.

File details

Details for the file mojo_compiler-1.0.0b1-py3-none-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for mojo_compiler-1.0.0b1-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 c1ef6a866f5f539cbf45cbf5193f3680c5804109e28137d0d1eb475afea1e43e
MD5 32ef21f884197ff33ea104862cc301f4
BLAKE2b-256 8bfa1d0111e99beb023b0d6e3c2c5240f8d0c75c0867e857850781f92dfaa643

See more details on using hashes here.

File details

Details for the file mojo_compiler-1.0.0b1-py3-none-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for mojo_compiler-1.0.0b1-py3-none-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 591a49ae3c2b80a9a16958c2580165802f6d03e14de83e59f6fe94b525950fe5
MD5 eb971d11006ca454de332875bfe3fd97
BLAKE2b-256 bc59d47a32659dd511a00dc3d0fa2d16f1a0863c22aaba4f664734d6dd05e5d4

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