Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New cmdline option wasmer create-exe --self-test #3092

Closed
NobodyXu opened this issue Aug 11, 2022 · 7 comments
Closed

New cmdline option wasmer create-exe --self-test #3092

NobodyXu opened this issue Aug 11, 2022 · 7 comments
Labels
🎉 enhancement New feature! priority-low Low priority issue 🏚 stale Inactive issues or PR
Milestone

Comments

@NobodyXu
Copy link
Contributor

Motivation

wasmer create-exe requires WASMER_DIR to be set to the location of the Wasmer installation and it also requires at least compiler cc and linker ld to be present.

In case where cross compilation is required, it would also need zig-cc to be present.

Proposed solution

I want to use wasm create-exe in cargo-bins/cargo-binstall#246 and having wasm create-exe --self-test that returns 0 on success would perfectly fix this issue, not only for cargo-binstall but also for other scripting usage of wasm create-exe.

Alternatives

We can use wasm create-exe to compile a simple hello-world wasi program to verify that it is usable, but that requires a simple hello-world wasi to be embedded in the program and compiling this program might also take a lot of computation resource and make the program sluggish.

Additional context

This feature request is first mentioned in #3053 (comment)

@NobodyXu NobodyXu added the 🎉 enhancement New feature! label Aug 11, 2022
@epilys epilys self-assigned this Aug 11, 2022
@epilys epilys added this to the v3.x milestone Aug 11, 2022
@epilys epilys added the priority-low Low priority issue label Aug 16, 2022
@NobodyXu
Copy link
Contributor Author

Errors are thrown if some component needed for create-exe is missing, to make this scriptable we can assign exit code numbers for each kind of error so that it can be part of an automated system.

So running wasmer create-exe with no argument will also gives error if something is missing?

@NobodyXu
Copy link
Contributor Author

@epilys So we still need "--self-test", but that won't be hard because wasmer already throw errors on missing components?

@epilys epilys removed their assignment Aug 24, 2022
@syrusakbary
Copy link
Member

If we have wasmer create-exe properly running and returning successful errors, I'm not sure we'll need --self-test.
Perhaps we need to add more extra tests into our CI

@NobodyXu
Copy link
Contributor Author

NobodyXu commented Sep 7, 2022

If we have wasmer create-exe properly running and returning successful errors, I'm not sure we'll need --self-test.

I propose --self-test because I don't want to compile a hello-world program just to figure out whether the host can run wasmer create-exe or not.

@fschutt
Copy link
Contributor

fschutt commented Sep 7, 2022

Okay, thanks @NobodyXu, we weren't sure what the motivation for this issue was. I'll discuss it further with @syrusakbary, we will get back to you.

@fschutt fschutt removed their assignment Oct 11, 2022
@ptitSeb ptitSeb modified the milestones: v3.x, v4.x May 3, 2023
Copy link

stale bot commented May 3, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the 🏚 stale Inactive issues or PR label May 3, 2024
Copy link

stale bot commented Jun 5, 2024

Feel free to reopen the issue if it has been closed by mistake.

@stale stale bot closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 enhancement New feature! priority-low Low priority issue 🏚 stale Inactive issues or PR
Projects
None yet
Development

No branches or pull requests

5 participants