Skip to content

ci(wasi): enable wasmtime tracing for debug logging - #15453

Merged
sylvestre merged 1 commit into
uutils:mainfrom
eduardomourar:wasi-wasmtime-log-debug
Oct 18, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
eduardomourar:wasi-wasmtime-log-debug

Conversation

@eduardomourar

Copy link
Copy Markdown
Contributor
  • Add WASMTIME_LOG environment variable to trace WASI syscalls when Actions debug logging is enabled
  • Add WASMTIME_LOG_NO_CONTEXT environment variable to reduce trace verbosity
  • Tracing is only active when runner.debug is '1', disabled otherwise for cleaner output

Comment thread .github/workflows/wasi.yml Outdated
if: matrix.job.target == 'wasm32-wasip1'
env:
RUSTFLAGS: ${{ matrix.job.rust-flags }}
# Trace WASI syscalls (strace-style) when Actions step debug logging is on;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make more sense on the "Run unit tests" step, where cargo runs wasmtime directly?

Comment thread .github/workflows/wasi.yml Outdated
RUSTFLAGS: ${{ matrix.job.rust-flags }}
# Trace WASI syscalls (strace-style) when Actions step debug logging is on;
# verbose, so off otherwise.
WASMTIME_LOG: ${{ runner.debug == '1' && 'wasmtime_wasi=trace' || '' }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this reach wasmtime? uutests calls env_clear() and only forwards PATH/HOME/LD_PRELOAD, so i think it's dropped
https://github.com/uutils/coreutils/blob/main/tests/uutests/src/lib/util.rs#L1986

Comment thread .github/workflows/wasi.yml Outdated
RUSTFLAGS: ${{ matrix.job.rust-flags }}
# Trace WASI syscalls (strace-style) when Actions step debug logging is on;
# verbose, so off otherwise.
WASMTIME_LOG: ${{ runner.debug == '1' && 'wasmtime_wasi=trace' || '' }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even if forwarded, the trace goes to stderr and would break the stderr checks, no?

@eduardomourar
eduardomourar force-pushed the wasi-wasmtime-log-debug branch from c7ea869 to a693105 Compare October 17, 2026 16:17
@sylvestre
sylvestre merged commit 6d2a174 into uutils:main Oct 18, 2026
89 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

@eduardomourar
eduardomourar deleted the wasi-wasmtime-log-debug branch October 18, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants