Skip to content

ckiee/inline-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inline-rust

Have you ever wanted to execute arbitrary Rust code at runtime? Well now you can!

use inline_rust::inline_rust;

fn main() {
    let foo: u8 = 5;
    inline_rust!(r#"println!("hi {}", foo)"#.to_string(), foo: u8);
}
$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target/debug/inline-rust`
hi 5

License

MIT.

About

Execute arbitrary Rust code at runtime

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages