Hasty sketch at rust demangling (work in progress); c.f #213
This commit is contained in:
parent
dadf9c2d85
commit
73880b9033
|
@ -0,0 +1 @@
|
|||
target
|
|
@ -0,0 +1,14 @@
|
|||
[root]
|
||||
name = "rustfilt"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"rustc-demangle 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[metadata]
|
||||
"checksum rustc-demangle 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1430d286cadb237c17c885e25447c982c97113926bb579f4379c0eca8d9586dc"
|
|
@ -0,0 +1,7 @@
|
|||
[package]
|
||||
name = "rustfilt"
|
||||
version = "0.1.0"
|
||||
authors = ["Matt Godbolt <matt@godbolt.org>"]
|
||||
|
||||
[dependencies]
|
||||
rustc-demangle = "*"
|
|
@ -0,0 +1,21 @@
|
|||
use std::io;
|
||||
use std::io::prelude::*;
|
||||
use rustc_demangle::demangle;
|
||||
|
||||
extern crate rustc_demangle;
|
||||
|
||||
fn main() {
|
||||
let stdin = io::stdin();
|
||||
|
||||
for line in stdin.lock().lines() {
|
||||
let a = line.unwrap();
|
||||
println!("{}", demangle(&a));
|
||||
}
|
||||
/*
|
||||
let var: Vec<String> = input.split(' ')
|
||||
.into_iter()
|
||||
.map(|x| demangle(x).to_string())
|
||||
.collect();
|
||||
println!("{}", var.join(" "));
|
||||
*/
|
||||
}
|
Loading…
Reference in New Issue