Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion crates/moonbit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,10 @@ impl WorldGenerator for MoonBit {
// Export project files
if !self.opts.ignore_stub && !self.opts.ignore_module_file {
let mut body = Source::default();
uwriteln!(&mut body, "{{ \"name\": \"{project_name}\" }}");
uwriteln!(
&mut body,
"{{ \"name\": \"{project_name}\", \"preferred-target\": \"wasm\" }}"
);
files.push(&format!("moon.mod.json"), body.as_bytes());
}

Expand Down
6 changes: 0 additions & 6 deletions crates/test/src/moonbit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ impl LanguageMethods for MoonBit {
let mut cmd = Command::new("moon");
cmd.arg("build")
.arg("--no-strip") // for debugging
.arg("--target")
.arg("wasm")
.arg("-C")
.arg(compile.bindings_dir);
runner.run_command(&mut cmd)?;
Expand Down Expand Up @@ -91,8 +89,6 @@ impl LanguageMethods for MoonBit {
fn verify(&self, runner: &crate::Runner<'_>, verify: &crate::Verify) -> anyhow::Result<()> {
let mut cmd = Command::new("moon");
cmd.arg("check")
.arg("--target")
.arg("wasm")
.arg("--warn-list")
.arg("-28")
.arg("--deny-warn")
Expand All @@ -102,8 +98,6 @@ impl LanguageMethods for MoonBit {
runner.run_command(&mut cmd)?;
let mut cmd = Command::new("moon");
cmd.arg("build")
.arg("--target")
.arg("wasm")
.arg("--source-dir")
.arg(verify.bindings_dir);

Expand Down
Loading