TheLeonsver1 opened issue #3093:
In here: https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md
In the C version you have
fprintf(stderr, "usage: %s <from> <to>\n", argv[0]);In the Rust version you have
eprintln!("usage: {} <input_file> <output_file>", program);In this section: https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md#executing-in-wasmtime-runtime you are showing the output of the C version which isn't the same as the output of the Rust version.
It is a minor issue but people looking only at the Rust code could be confused as to why the output is not what they expect.
TheLeonsver1 edited issue #3093:
In here: https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md
In the C version you have
fprintf(stderr, "usage: %s <from> <to>\n", argv[0]);In the Rust version you have
eprintln!("usage: {} <input_file> <output_file>", program);In this section: https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md#executing-in-wasmtime-runtime you are showing the output of the C version, which isn't the same as the output of the Rust version.
It is a minor issue but people looking only at the Rust code could be confused as to why the output is not what they expect.
TheLeonsver1 edited issue #3093:
In here: https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md
In the C version you have
fprintf(stderr, "usage: %s <from> <to>\n", argv[0]);In the Rust version you have
eprintln!("usage: {} <input_file> <output_file>", program);In this section: https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md#executing-in-wasmtime-runtime you are showing the output of the C version, which isn't the same as the output of the Rust version(
input_filevsfromandoutput_filevsto.
It is a minor issue but people looking only at the Rust code could be confused as to why the output is not what they expect.
TheLeonsver1 edited issue #3093:
In here: https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md
In the C version you have
fprintf(stderr, "usage: %s <from> <to>\n", argv[0]);In the Rust version you have
eprintln!("usage: {} <input_file> <output_file>", program);In this section: https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md#executing-in-wasmtime-runtime you are showing the output of the C version, which isn't the same as the output of the Rust version(
input_filevsfromandoutput_filevsto).
It is a minor issue but people looking only at the Rust code could be confused as to why the output is not what they expect.
alexcrichton closed issue #3093:
In here: https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md
In the C version you have
fprintf(stderr, "usage: %s <from> <to>\n", argv[0]);In the Rust version you have
eprintln!("usage: {} <input_file> <output_file>", program);In this section: https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md#executing-in-wasmtime-runtime you are showing the output of the C version, which isn't the same as the output of the Rust version(
input_filevsfromandoutput_filevsto).
It is a minor issue but people looking only at the Rust code could be confused as to why the output is not what they expect.
pchickey commented on issue #3093:
Thanks for the report, this is fixed now.
Last updated: Dec 06 2025 at 06:05 UTC