https://github.com/maxdeviant/wasmtime-current-dir-repro
https://github.com/maxdeviant/wasmtime-current-dir-repro
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maxdeviant/wasmtime-current-dir-repro
- Owner: maxdeviant
- Created: 2025-03-17T19:08:27.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-03-17T19:53:17.000Z (12 months ago)
- Last Synced: 2025-03-17T20:29:36.042Z (12 months ago)
- Language: Rust
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wasm `std::env::current_dir` repro
```
cargo build --target wasm32-wasip1
wasmtime run --dir=$PWD --env PWD ./target/wasm32-wasip1/debug/wasm-current-dir-repro.wasm
```
## Output
### macOS
```
PWD: "/Users/runner/work/wasmtime-current-dir-repro/wasmtime-current-dir-repro"
Before: "/"
After: "/Users/runner/work/wasmtime-current-dir-repro/wasmtime-current-dir-repro"
```
### Linux
```
PWD: "/home/runner/work/wasmtime-current-dir-repro/wasmtime-current-dir-repro"
Before: "/"
After: "/home/runner/work/wasmtime-current-dir-repro/wasmtime-current-dir-repro"
```
### Windows
```
PWD: "D:/a/wasmtime-current-dir-repro/wasmtime-current-dir-repro"
Before: "/"
After: "/D:/a/wasmtime-current-dir-repro/wasmtime-current-dir-repro"
```