bytecodealliance / bytecodealliance/wasmtime

Fine-grained recompilation for numerical constants

Open
#5,448 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 18h
Merged PRs (30d)
126

Description

#### Feature

Fine-grained recompilation for numerical constants.

#### Benefit

When developing, especially in creative contexts like games or visual demos, you often want to tweak a constant integer value and then rerun the application.

While live-reloading the value from within the application is superior, this is often hard to setup, and application specific. Furthermore, even if your application supports live-reloading, it may not support it for arbitrary numbers buried within an internal algorithm somewhere.

Having super quick compile times when only tweaking an integer would be a huge improvement to the development cycle.

#### Implementation

I'm not familiar with how cranelift works, but in the context of the recent stencil changes (https://www.reddit.com/r/rust/comments/zmqj0g/cranelift_progress_in_2022/), I imagine a way where the compiler could detect only an integer changed, and as fixed-size numericals take up constant space regardless of their value, patch in the new value either directly into the binary, or at least decreasing compile work.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.