mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-28 04:01:33 +00:00
Generate enum js code
This commit is contained in:
@ -8,6 +8,7 @@ use std::hash::{Hash, Hasher};
|
||||
#[derive(Deserialize)]
|
||||
pub struct Program {
|
||||
pub exports: Vec<Export>,
|
||||
pub enums: Vec<Enum>,
|
||||
pub imports: Vec<Import>,
|
||||
pub custom_type_names: Vec<CustomTypeName>,
|
||||
}
|
||||
@ -32,6 +33,17 @@ pub struct Export {
|
||||
pub function: Function,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct Enum {
|
||||
pub name: String,
|
||||
pub variants: Vec<EnumVariant>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct EnumVariant {
|
||||
pub name: String
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct Function {
|
||||
pub name: String,
|
||||
|
Reference in New Issue
Block a user