rust-lang / rust-lang/rustc_codegen_cranelift

In-place binary/jit updating

Open
#1,087 16 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-jit C-enhancement compile-time
Dominant language
Rust
Stars
2.1k
Forks
157
Avg merge
1d 19h
Merged PRs (30d)
3

Description

Loris Cro and Andrew Kelley recently published a blog post (https://kristoff.it/blog/zig-new-relationship-llvm/) about Ziglang's new self-hosted compiler. Part of the post is about how they can do in-place patching of the binary to avoid doing linking when changing small amounts of code (or maybe larger amounts too, I'm not sure). This seems extremely powerful. Linking is consistently a significant bottleneck in compiling rust, and completely skipping it would probably result in crazy speedups for compiling.

I'm proposing that this project pursue this either in a similar way to Zig, by patching individual functions in the output binary, or by keeping the jit open and recompiling individual functions as the source changes.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Zig self-hosted compiler blog post and compare its in-place binary patching approach with the project's current compilation and linking flow. The issue does not name files, tests, or an entry point, and completion would require defining whether function patching or keeping a JIT open is the intended design.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.