MCPcopy Create free account
hub / github.com/WilliamVenner/inline-rust / inline_rust

Function inline_rust

src/lib.rs:103–147  ·  view source on GitHub ↗

Inline the output of Rust code into your code. # Examples ```no_run #[macro_use] extern crate inline_rust; // Compiles using cargo const CONST_HASH: &'static str = inline_rust!( r#" [dependencies] sha2 = "0.9.8" "#, { use sha2::Digest; let mut sum: i32 = 0; for n in 0..30 { sum += n; } format!("\"{:x}\"", sha2::Sha256::digest(&sum.to_ne_bytes())) } ); // Compiles using rustc const CONST_FOR_

(tokens: TokenStream)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 4

exec_idFunction · 0.85
intoMethod · 0.80
target_dirMethod · 0.80
try_inlineFunction · 0.70

Tested by

no test coverage detected