mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 12:31:22 +00:00
@ -415,6 +415,7 @@ impl Program {
|
||||
pub fn shared(&self) -> shared::Program {
|
||||
shared::Program {
|
||||
exports: self.exports.iter().map(|a| a.shared()).collect(),
|
||||
structs: self.structs.iter().map(|a| a.name.as_ref().to_string()).collect(),
|
||||
enums: self.enums.iter().map(|a| a.shared()).collect(),
|
||||
imports: self.imports.iter().map(|a| a.shared()).collect(),
|
||||
version: shared::version(),
|
||||
|
@ -1279,6 +1279,11 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
for e in self.program.enums.iter() {
|
||||
self.generate_enum(e);
|
||||
}
|
||||
for s in self.program.structs.iter() {
|
||||
self.cx.exported_classes
|
||||
.entry(s.clone())
|
||||
.or_insert_with(Default::default);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn generate_export(&mut self, export: &shared::Export) {
|
||||
|
@ -8,6 +8,7 @@ pub struct Program {
|
||||
pub exports: Vec<Export>,
|
||||
pub enums: Vec<Enum>,
|
||||
pub imports: Vec<Import>,
|
||||
pub structs: Vec<String>,
|
||||
pub version: String,
|
||||
pub schema_version: String,
|
||||
}
|
||||
|
Reference in New Issue
Block a user