Skip to content

Commit

Permalink
Merge #990
Browse files Browse the repository at this point in the history
990: Allow to do wasmer execution without the `run` argument r=MarkMcCaskey a=syrusakbary


# Description
This PR allows Wasmer to run files directly without doing `wasmer run xyz.wasm`.
So you can do `wasmer xyz.wasm`

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Syrus <[email protected]>
Co-authored-by: Mark McCaskey <[email protected]>
  • Loading branch information
3 people authored Nov 20, 2019
2 parents 6831a6d + 76e346b commit 32a8da1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## **[Unreleased]**

- [#990](https://github.com/wasmerio/wasmer/pull/990) Default wasmer CLI to `run`. Wasmer will now attempt to parse unrecognized command line options as if they were applied to the run command: `wasmer mywasm.wasm --dir=.` now works!
- [#987](https://github.com/wasmerio/wasmer/pull/987) Fix `runtime-c-api` header files when compiled by gnuc.

## 0.10.2 - 2019-11-18
Expand Down
3 changes: 2 additions & 1 deletion src/bin/wasmer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,8 @@ fn get_compiler_by_backend(backend: Backend) -> Option<Box<dyn Compiler>> {
}

fn main() {
let options = CLIOptions::from_args();
let options = CLIOptions::from_iter_safe(env::args())
.unwrap_or_else(|_| CLIOptions::Run(Run::from_args()));
match options {
CLIOptions::Run(options) => run(options),
#[cfg(not(target_os = "windows"))]
Expand Down

0 comments on commit 32a8da1

Please sign in to comment.