Skip to content

libclang_mojo 0.2.0 — Mojo 1.2.0 shimless build 1

Latest

Choose a tag to compare

@MoSafi2 MoSafi2 released this 31 Oct 22:38
· 16 commits to master since this release

libclang_mojo 0.2.0, build 1 — shimless bindings for Mojo 1.2.0 and libclang 18. Supports Linux x86-64, Linux ARM64, and macOS ARM64.

Install the package

With Pixi 0.80 or newer, run in an empty directory:

curl -fL -o pixi.toml \
  https://github.com/MoSafi2/mojo_libclang/releases/download/v0.2.0/pixi.toml
pixi install

Install from source

pixi init clang-app -c https://conda.modular.com/max -c conda-forge
cd clang-app
pixi workspace preview add pixi-build
pixi add libclang_mojo \
  --git https://github.com/MoSafi2/mojo_libclang.git \
  --rev v0.2.0 \
  --subdirectory packaging/modular-community/libclang_mojo

Import with from clang.cindex import Index. Compile your application with pixi run mojo build main.mojo -o app and run it with pixi run ./app.

Updating: refresh the manifest and lockfile. For Mojo nightly, use the prerelease.