File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
wasm-bindgen-cli-support/src Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ fn extract_programs(module: &mut Module) -> Vec<shared::Program> {
163
163
panic ! ( "failed to decode what looked like wasm-bindgen data: {}" , e)
164
164
}
165
165
} ;
166
- if p. version != version {
166
+ if p. schema_version != shared :: SCHEMA_VERSION {
167
167
panic ! ( "
168
168
169
169
it looks like the Rust project used to create this wasm file was linked against
Original file line number Diff line number Diff line change @@ -351,6 +351,7 @@ impl Program {
351
351
} )
352
352
} ) ,
353
353
( "version" , & |a| a. str ( & shared:: version ( ) ) ) ,
354
+ ( "schema_version" , & |a| a. str ( & shared:: SCHEMA_VERSION ) ) ,
354
355
] ) ;
355
356
a. cnt
356
357
} ;
Original file line number Diff line number Diff line change @@ -5,13 +5,16 @@ extern crate fnv;
5
5
use std:: char;
6
6
use std:: hash:: { Hash , Hasher } ;
7
7
8
+ pub const SCHEMA_VERSION : & str = "0" ;
9
+
8
10
#[ derive( Deserialize ) ]
9
11
pub struct Program {
10
12
pub exports : Vec < Export > ,
11
13
pub enums : Vec < Enum > ,
12
14
pub imports : Vec < Import > ,
13
15
pub custom_type_names : Vec < CustomTypeName > ,
14
16
pub version : String ,
17
+ pub schema_version : String ,
15
18
}
16
19
17
20
#[ derive( Deserialize ) ]
You can’t perform that action at this time.
0 commit comments