This commit is contained in:
Alex Crichton
2018-02-05 16:39:11 -08:00
parent 8f8da49dab
commit 0320bc0d7c
5 changed files with 163 additions and 19 deletions

View File

@ -61,6 +61,13 @@ impl Function {
name.push_str(&self.name);
return name
}
pub fn mangled_import_name(&self, struct_: Option<&str>) -> String {
match struct_ {
Some(s) => format!("__wbg_s_{}_{}", s, self.name),
None => format!("__wbg_f_{}", self.name),
}
}
}
#[derive(Serialize, Deserialize)]