File tree 1 file changed +16
-10
lines changed
1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -59,16 +59,22 @@ fn main() {
59
59
}
60
60
61
61
// Compose components.
62
- for entry in std:: fs:: read_dir ( wasm_out. clone ( ) ) . expect ( "Failed to read directory" ) {
63
- let entry = entry. expect ( "Failed to read directory entry" ) ;
64
- let path = entry. path ( ) ;
65
-
66
- for entry_2 in std:: fs:: read_dir ( wasm_out. clone ( ) ) . expect ( "Failed to read directory" ) {
67
- let entry_2 = entry_2. expect ( "Failed to read directory entry" ) ;
68
- let path_2 = entry_2. path ( ) ;
69
-
70
- let path_a = path. as_os_str ( ) . to_str ( ) . unwrap ( ) ;
71
- let path_b = path_2. as_os_str ( ) . to_str ( ) . unwrap ( ) ;
62
+ // We must manually specify the order of composition via this array.
63
+ for name in [
64
+ "unavi_vscreen.wasm" ,
65
+ "unavi_ui.wasm" ,
66
+ "unavi_shapes.wasm" ,
67
+ "unavi_scene.wasm" ,
68
+ "unavi_layout.wasm" ,
69
+ ] {
70
+ let path_a: PathBuf = [ wasm_out. to_str ( ) . unwrap ( ) , name] . iter ( ) . collect ( ) ;
71
+
72
+ for entry_b in std:: fs:: read_dir ( wasm_out. clone ( ) ) . expect ( "Failed to read directory" ) {
73
+ let entry_b = entry_b. expect ( "Failed to read directory entry" ) ;
74
+ let path_b = entry_b. path ( ) ;
75
+
76
+ let path_a = path_a. as_os_str ( ) . to_str ( ) . unwrap ( ) ;
77
+ let path_b = path_b. as_os_str ( ) . to_str ( ) . unwrap ( ) ;
72
78
73
79
let output = Command :: new ( "wac" )
74
80
. args ( [ "plug" , "--plug" , path_a, path_b] )
You can’t perform that action at this time.
0 commit comments