Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/MojoLlama/blob/main/src/mojollama/mojo_engine/build.sh # MojoLlama Archived Mojo/MAX quantizer and serving research repository (read-only history) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `MojoLlama / src / mojollama / mojo_engine / build.sh` 31 lines · 924 bytes Raw Blame History 1 # MojoLlama Mojo Engine — Build Script 2 # Builds the pure Mojo engine from source. 3 # 4 # Prerequisites: 5 # - Mojo 0.26.2 installed 6 # - GCC 7 # - Model weights dumped (via dump_weights.py) 8 # 9 # Usage: 10 # bash build.sh # Build mojo_engine_v6 11 # LD_LIBRARY_PATH= ./mojo_engine_v6 12 13 MOJO_LIB="$HOME/.local/share/uv/tools/mojo/lib/python3.11/site-packages/modular/lib" 14 15 # 1. Build the C bridge (file I/O + raw memory access) 16 gcc -c -fPIC -o read_helpers.o read_helpers.c 17 18 # 2. Build Mojo engine to object file 19 mojo build mojo_engine_v6_final.mojo --emit object -o mojo_v6.o 20 21 # 3. Link with Mojo runtime 22 gcc -o mojo_engine_v6 mojo_v6.o read_helpers.o \ 23 -L"$MOJO_LIB" \ 24 -lKGENCompilerRTShared \ 25 -lAsyncRTRuntimeGlobals \ 26 -lMSupportGlobals \ 27 -lAsyncRTMojoBindings \ 28 -lm -lpthread -ldl -lstdc++ 29 30 echo "Built: mojo_engine_v6" 31 echo "Run: LD_LIBRARY_PATH=\"$MOJO_LIB\" ./mojo_engine_v6"