You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ help -l | rg wasm3ctags.wasm3file.wasm3mktemp.wasm3readtags.wasm3rg.wasm3swift-format-main.wasm3swift-format.wasm3tree.wasm3wasm3xz.wasm3xzdec.wasm3
Actual behavior
$ help -l | rg wasm3a-shell/Resources_mini/commandDictionary.plist908: <key>wasm3</key>911: <string>wasm3</string>a-shell/Resources_mini/node_modules/@wasmer/wasi/lib/constants.js281:// a-Shell: this was reversed from wasm32-wasi/predefined-macros.txta-shell/a-Shell/ExtraCommands.swift74: fputs("JIT webAssembly is not available \"In Extension\". Try \"wasm3\".\n", thread_stderr)a-shell/a-Shell/AppDelegate.swift296: setenv("CCC_OVERRIDE_OPTIONS", "#^--target=wasm32-wasip1 ^-fwasm-exceptions +-lunwind", 1) // silently add "--target=wasm32-wasi" at the beginning of arguments and "-lunwind" at the end.a-shell/a-Shell/SceneDelegate.swift3060: let unzipPath = documentsUrl.appendingPathComponent("bin/unzip.wasm3").path3071: let xzPath = documentsUrl.appendingPathComponent("bin/xz.wasm3").path4115: if (compileOptions.isEqual("#^--target") || compileOptions.isEqual("#^--target=wasm32-wasi")) {4116: setenv("CCC_OVERRIDE_OPTIONS", "#^--target=wasm32-wasip1 ^-fwasm-exceptions +-lunwind", 1)a-shell/Resources/commandDictionary.plist971: <key>wasm3</key>974: <string>wasm3</string>a-shell/Resources/node_modules/parcel-bundler/lib/assets/RustAsset.js32:const RUST_TARGET = 'wasm32-unknown-unknown';a-shell/Resources/node_modules/parcel-bundler/src/assets/RustAsset.js13:const RUST_TARGET = 'wasm32-unknown-unknown';a-shell/Resources/node_modules/@wasmer/wasi/lib/constants.js281:// a-Shell: this was reversed from wasm32-wasi/predefined-macros.txta-shell/Resources/usr_old/include/c++/v1/__cxxabi_config.h87:// wasm32 follows the arm32 ABI convention of using 32-bit guard.88:#if defined(__arm__) || defined(__wasm32__) || defined(__ARM64_ARCH_8_32__)a-shell/Resources/usr_old/include/wasi/api.h23:#ifndef __wasm32__24:#error <wasi/api.h> only supports wasm32; doesn't yet support wasm64a-shell/Resources/usr_old/share/wasm32-wasi/predefined-macros.txt3149:#define __wasm32 13150:#define __wasm32__ 1
Environment
iPadOS 18.3 Developer Beta 1
a-Shell 1.15.10 (App Store)
The text was updated successfully, but these errors were encountered:
I can reproduce this issue. I'm working on it, but I'm not sure I will be able to fix it.
It also fails with the standard interpreter (help -l | wasm rg.wasm3) instead of the wasm3 interpreter. Based on the results, rg is scanning the current working directory instead of scanning the standard input, but I'm not sure why.
rg calls fdstat_get twice, with fd equals 1, then 0, then calls prestat_get with fd equals 3, 4, then 5.
I spoke too fast: it turns out rg checks whether stdin is readable (in crates/cli/src/lib.rs), and defaults to false on non-Unix, non-Windows targets (and wasi is not considered a part of Unix). I've added a few lines so that stdin is always readable on wasi, and now help -l | rg wasm3 works. I'll let you test it for a while, if you want.
There will obviously be an issue if stdin is not readable, but I don't see a clear way to check for that (also I don't know how that can happen in a-Shell).
Summary
command | rg keyword
doesn't work.Steps to reproduce
prerequisite:
pkg install rg
help -l | rg wasm3
Expected behavior
Actual behavior
Environment
The text was updated successfully, but these errors were encountered: