https://github.com/tversteeg/const-tweaker
🤪 Tweak constant variables live when running a program
https://github.com/tversteeg/const-tweaker
gamedev runtime-config rust web-gui
Last synced: about 1 year ago
JSON representation
🤪 Tweak constant variables live when running a program
- Host: GitHub
- URL: https://github.com/tversteeg/const-tweaker
- Owner: tversteeg
- License: agpl-3.0
- Created: 2020-03-15T12:39:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:49:38.000Z (over 2 years ago)
- Last Synced: 2025-04-30T08:54:51.370Z (about 1 year ago)
- Topics: gamedev, runtime-config, rust, web-gui
- Language: Rust
- Homepage:
- Size: 1020 KB
- Stars: 75
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
const-tweaker
Tweak const variables live from a web GUI.
This library opens a web interface when the application is run, allowing you to change the values of constants in real time.
It's especially useful for gamedev where you want to tweak some variables without introducing a hot-reloading scripting language for it.
After running your application the web GUI to change constants is opened at [`127.0.0.1:9938`](http://127.0.0.1:9938).
## Example
```rust
// Create a slider to tweak 'VALUE' in the web GUI
#[const_tweaker::tweak]
const VALUE: f64 = 0.0;
fn main() {
// Enter a GUI/Game loop
loop {
// Print the constant value that can be changed from the website
println!("VALUE: {}", VALUE);
// ...
}
}
```