Skip to content

Remove LLVM from core crates#125

Merged
0xGeorgii merged 11 commits intomainfrom
remove-llvm
Feb 15, 2026
Merged

Remove LLVM from core crates#125
0xGeorgii merged 11 commits intomainfrom
remove-llvm

Conversation

@0xGeorgii
Copy link
Contributor

No description provided.

@0xGeorgii 0xGeorgii self-assigned this Feb 15, 2026
@0xGeorgii 0xGeorgii added inf2wasm Inference to WASM converting codegen Bytecode emitting refactoring Project supplements labels Feb 15, 2026
@0xGeorgii 0xGeorgii linked an issue Feb 15, 2026 that may be closed by this pull request
@Inferara Inferara deleted a comment from codecov bot Feb 15, 2026
@Inferara Inferara deleted a comment from codecov bot Feb 15, 2026
@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

❌ Patch coverage is 67.31392% with 101 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
core/wasm-codegen/src/compiler.rs 64.70% 96 Missing ⚠️
core/cli/src/main.rs 0.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request removes the LLVM dependency from the Inference compiler, replacing LLVM-based code generation with direct WebAssembly binary generation using the wasm-encoder crate. This is a major architectural simplification that eliminates the need for external binaries (inf-llc, rust-lld) and the LLVM toolchain.

Changes:

  • Replaced LLVM IR generation with direct WASM binary generation via wasm-encoder
  • Removed all external binary dependencies (inf-llc, rust-lld, libLLVM.so)
  • Simplified build configuration by removing build.rs and LLVM-related Cargo settings
  • Updated all tests to work with the new WASM-direct output
  • Cleaned up documentation to remove LLVM references and installation instructions

Reviewed changes

Copilot reviewed 47 out of 53 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
core/wasm-codegen/src/compiler.rs Complete rewrite to emit WASM instructions directly using wasm-encoder instead of LLVM IR
core/wasm-codegen/src/output.rs Changed from storing LLVM IR text to storing WASM binary bytes
core/wasm-codegen/src/target.rs Removed LLVM-specific methods (triple, cpu, llc_features, as_llc_flag)
core/wasm-codegen/src/lib.rs Removed LLVM initialization and updated to use wasm-encoder directly
core/wasm-codegen/build.rs Deleted - no longer needs to copy external binaries
core/wasm-codegen/Cargo.toml Replaced inkwell dependency with wasm-encoder
tests/src/utils.rs Removed compile_ir_to_wasm_for_tests and 160+ lines of external toolchain invocation code
tests/src/codegen/wasm/validation.rs Updated tests from checking LLVM IR content to checking WASM opcodes
tests/src/codegen/wasm/base.rs Added new tests for i64_uzumaki, bool_literal, and mixed_visibility; simplified instantiation
tests/test_data/codegen/wasm/base/*.wasm Added binary WASM test data files
tests/Cargo.toml Removed tempfile dependency
core/cli/src/toolchain/* Removed llc.rs, lld.rs, env.rs, and paths.rs (external tool invocation)
core/cli/src/main.rs Simplified to use WASM bytes directly from CodegenOutput
core/cli/Cargo.toml Removed tempfile dependency
book/*.md Moved LLVM installation guides to appendix/llvm-legacy-setup.md, updated compilation_targets.md
book/check_deps.* Deleted dependency check scripts (no longer needed)
README.md Removed external binary download instructions, simplified build steps
Cargo.toml Removed inkwell workspace dependency, updated tree-sitter and anyhow versions
.cargo/config.toml Removed LLVM library paths and linking configuration
.github/workflows/*.yml Removed LLVM installation, binary caching, and environment setup steps

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@0xGeorgii 0xGeorgii merged commit 7af98a1 into main Feb 15, 2026
0 of 5 checks passed
@0xGeorgii 0xGeorgii deleted the remove-llvm branch February 15, 2026 09:14
@0xGeorgii 0xGeorgii changed the title Remove llvm Remove LLVM from core crates Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codegen Bytecode emitting inf2wasm Inference to WASM converting refactoring Project supplements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inference to WASM emition

1 participant