1
0
Fork
You've already forked ullvm
0
No description
  • LLVM 95%
  • Rust 2.2%
  • C 2.1%
  • C++ 0.6%
William Tange 7f93fa2b93
All checks were successful
ci/woodpecker/push/deploy Pipeline was successful
Add more examples
2026年04月25日 21:17:27 +02:00
.woodpecker Allow empty 2026年04月25日 11:28:40 +02:00
demo Add repo url 2026年04月25日 14:13:45 +02:00
emsdk @2a9b4692ab Document emsdk 2026年04月22日 09:43:09 +02:00
llvm-project @40af7a9e44 Init cfg graph with bb names 2026年04月23日 13:34:13 +02:00
ullvm Add more examples 2026年04月25日 21:17:27 +02:00
.gitignore Try adding demo/app.{js,wasm} to root .gitignore 2026年04月25日 12:03:25 +02:00
.gitmodules Init cfg graph with bb names 2026年04月23日 13:34:13 +02:00
README.md -j8 doesn't seem to do anything 2026年04月24日 20:55:48 +02:00

ullvm

WASM libraries are present in llvm-project/build/lib/ and llvm-sys/target/wasm32-unknown-emscripten/debug/.

Build

First, pull this repo and init submodules:

git clone --no-sparse --recursive --shallow-submodules https://codeberg.org/0d/ullvm.git

First, download and enable latest emscripten:

cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
cd ..

Next, build llvm with emscripten:

mkdir llvm-project/build
cd llvm-project/build
emcmake cmake -G Ninja ../llvm
ninja LLVMAsmParser LLVMBinaryFormat LLVMBitReader LLVMBitstreamReader LLVMCore LLVMExecutionEngine LLVMIRReader LLVMRemarks LLVMSupport LLVMTarget LLVMTargetParser
cd ../..

Then, build ullvm targeting emscripten:

cd ullvm
cargo build --target=wasm32-unknown-emscripten
cd ..

You should then be able to compile demo/, linking all the necessary .a WASM archives:

cd demo
make
python3 -m http.server