blob: 93604a38f4a83b88f4acd7c29324a1d23cbd3a76 [file] [log] [blame]
use std::fs::File;
use std::io::prelude::*;
use runfiles::Runfiles;
fn main() {
let r = Runfiles::create().unwrap();
let mut f = File::open(runfiles::rlocation!(
r,
"examples/hello_runfiles/hello_runfiles.rs"
))
.unwrap();
let mut buffer = String::new();
f.read_to_string(&mut buffer).unwrap();
println!("This program's source is {} characters long.", buffer.len());
}