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

implement map-dir for WASI; fix bug in path_open #451

Merged
merged 9 commits into from
May 21, 2019
Merged

Conversation

MarkMcCaskey
Copy link
Contributor

@MarkMcCaskey MarkMcCaskey commented May 17, 2019

Colon separated mapping, implemented to be compatible with wasmtime

resolves #458

example:

use std::fs;

fn main() {
    let read_dir = fs::read_dir(".").unwrap();
    for entry in read_dir {
        println!("{:?}", entry.unwrap().path());
    }
}
$ cargo run --release --bin wasmer -- run --mapdir=.:src list-files.wasm
"./bin"
"./installer"
"./lib"
"./update"
"./utils"
"./webassembly"

@MarkMcCaskey MarkMcCaskey added the 📦 lib-wasi About wasmer-wasi label May 17, 2019
@MarkMcCaskey
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request May 17, 2019
@bors
Copy link
Contributor

bors bot commented May 17, 2019

try

Build failed

@MarkMcCaskey MarkMcCaskey mentioned this pull request May 20, 2019
@MarkMcCaskey
Copy link
Contributor Author

bors try

@MarkMcCaskey MarkMcCaskey requested a review from syrusakbary May 20, 2019 23:46
bors bot added a commit that referenced this pull request May 20, 2019
@bors
Copy link
Contributor

bors bot commented May 20, 2019

try

Build failed

@MarkMcCaskey
Copy link
Contributor Author

bors try-

@MarkMcCaskey
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request May 20, 2019
@bors
Copy link
Contributor

bors bot commented May 21, 2019

try

Build failed

@MarkMcCaskey
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request May 21, 2019
@MarkMcCaskey
Copy link
Contributor Author

bors try-

@MarkMcCaskey
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request May 21, 2019
@MarkMcCaskey
Copy link
Contributor Author

bors r+

bors bot added a commit that referenced this pull request May 21, 2019
451: implement map-dir for WASI; fix bug in path_open r=MarkMcCaskey a=MarkMcCaskey

Colon separated mapping, implemented to be compatible with wasmtime

resolves #458 

example:
```Rust
use std::fs;

fn main() {
    let read_dir = fs::read_dir(".").unwrap();
    for entry in read_dir {
        println!("{:?}", entry.unwrap().path());
    }
}
```
```shell
$ cargo run --release --bin wasmer -- run --mapdir=.:src list-files.wasm
"./bin"
"./installer"
"./lib"
"./update"
"./utils"
"./webassembly"
```

Co-authored-by: Mark McCaskey <[email protected]>
Co-authored-by: Mark McCaskey <[email protected]>
@bors
Copy link
Contributor

bors bot commented May 21, 2019

@bors
Copy link
Contributor

bors bot commented May 21, 2019

@bors bors bot merged commit 54a91a1 into master May 21, 2019
@bors bors bot deleted the feature/map-dir branch May 21, 2019 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 lib-wasi About wasmer-wasi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--mapdir flag
2 participants