https://github.com/fschutt/miri-repl-test
Test to use MIRI inside of an application in order to be able to hot-reload code
https://github.com/fschutt/miri-repl-test
Last synced: 14 days ago
JSON representation
Test to use MIRI inside of an application in order to be able to hot-reload code
- Host: GitHub
- URL: https://github.com/fschutt/miri-repl-test
- Owner: fschutt
- Created: 2019-04-20T12:42:19.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-21T16:17:08.000Z (about 7 years ago)
- Last Synced: 2025-10-14T07:18:21.477Z (8 months ago)
- Language: Rust
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# miri-repl-test
The goal of this repository is to document how to use MIRI (https://github.com/rust-lang/miri)
as an "embedded compiler", so that applications like games can hot-reload code
(so it's quickly editable while building the game) and then (in a release build),
compile it with the normal rust compiler.
This repository compiles on `nightly-2019-04-20`, be sure to install the correct compiler:
```
rustup toolchain add nightly-2019-04-20
rustup override nightly
rustup install miri
```
Since the rustc driver needs a file, the "compiler" builds a cache with the code
wrapped in a "autogen_0.rs" file at runtime.
This is just a test if / how this would work and if it is possible to pass struct
between the interpreted code and the Rust code back and forth. So far it compiles
and