File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -572,7 +572,10 @@ impl WorldGenerator for MoonBit {
572572 // Export project files
573573 if !self . opts . ignore_stub && !self . opts . ignore_module_file {
574574 let mut body = Source :: default ( ) ;
575- uwriteln ! ( & mut body, "{{ \" name\" : \" {project_name}\" }}" ) ;
575+ uwriteln ! (
576+ & mut body,
577+ "{{ \" name\" : \" {project_name}\" , \" preferred-target\" : \" wasm\" }}"
578+ ) ;
576579 files. push ( & format ! ( "moon.mod.json" ) , body. as_bytes ( ) ) ;
577580 }
578581
Original file line number Diff line number Diff line change @@ -49,8 +49,6 @@ impl LanguageMethods for MoonBit {
4949 let mut cmd = Command :: new ( "moon" ) ;
5050 cmd. arg ( "build" )
5151 . arg ( "--no-strip" ) // for debugging
52- . arg ( "--target" )
53- . arg ( "wasm" )
5452 . arg ( "-C" )
5553 . arg ( compile. bindings_dir ) ;
5654 runner. run_command ( & mut cmd) ?;
@@ -91,8 +89,6 @@ impl LanguageMethods for MoonBit {
9189 fn verify ( & self , runner : & crate :: Runner < ' _ > , verify : & crate :: Verify ) -> anyhow:: Result < ( ) > {
9290 let mut cmd = Command :: new ( "moon" ) ;
9391 cmd. arg ( "check" )
94- . arg ( "--target" )
95- . arg ( "wasm" )
9692 . arg ( "--warn-list" )
9793 . arg ( "-28" )
9894 . arg ( "--deny-warn" )
@@ -102,8 +98,6 @@ impl LanguageMethods for MoonBit {
10298 runner. run_command ( & mut cmd) ?;
10399 let mut cmd = Command :: new ( "moon" ) ;
104100 cmd. arg ( "build" )
105- . arg ( "--target" )
106- . arg ( "wasm" )
107101 . arg ( "--source-dir" )
108102 . arg ( verify. bindings_dir ) ;
109103
You can’t perform that action at this time.
0 commit comments