diff --git a/crates/c-api/include/wasi.h b/crates/c-api/include/wasi.h index 2df7df441253..e1a7ffc5dcda 100644 --- a/crates/c-api/include/wasi.h +++ b/crates/c-api/include/wasi.h @@ -35,13 +35,13 @@ WASI_API_EXTERN void wasi_config_inherit_argv(wasi_config_t* config); WASI_API_EXTERN void wasi_config_set_env(wasi_config_t* config, int envc, const char* names[], const char* values[]); WASI_API_EXTERN void wasi_config_inherit_env(wasi_config_t* config); -WASI_API_EXTERN bool wasi_config_set_stdin(wasi_config_t* config, const char* path); +WASI_API_EXTERN bool wasi_config_set_stdin_file(wasi_config_t* config, const char* path); WASI_API_EXTERN void wasi_config_inherit_stdin(wasi_config_t* config); -WASI_API_EXTERN bool wasi_config_set_stdout(wasi_config_t* config, const char* path); +WASI_API_EXTERN bool wasi_config_set_stdout_file(wasi_config_t* config, const char* path); WASI_API_EXTERN void wasi_config_inherit_stdout(wasi_config_t* config); -WASI_API_EXTERN bool wasi_config_set_stderr(wasi_config_t* config, const char* path); +WASI_API_EXTERN bool wasi_config_set_stderr_file(wasi_config_t* config, const char* path); WASI_API_EXTERN void wasi_config_inherit_stderr(wasi_config_t* config); WASI_API_EXTERN bool wasi_config_preopen_dir(wasi_config_t* config, const char* path, const char* guest_path); diff --git a/crates/c-api/src/wasi.rs b/crates/c-api/src/wasi.rs index 5c71d8619402..5aeeb75e546f 100644 --- a/crates/c-api/src/wasi.rs +++ b/crates/c-api/src/wasi.rs @@ -83,7 +83,7 @@ pub unsafe extern "C" fn wasi_config_inherit_env(config: *mut wasi_config_t) { } #[no_mangle] -pub unsafe extern "C" fn wasi_config_set_stdin( +pub unsafe extern "C" fn wasi_config_set_stdin_file( config: *mut wasi_config_t, path: *const c_char, ) -> bool { @@ -103,7 +103,7 @@ pub unsafe extern "C" fn wasi_config_inherit_stdin(config: *mut wasi_config_t) { } #[no_mangle] -pub unsafe extern "C" fn wasi_config_set_stdout( +pub unsafe extern "C" fn wasi_config_set_stdout_file( config: *mut wasi_config_t, path: *const c_char, ) -> bool { @@ -123,7 +123,7 @@ pub unsafe extern "C" fn wasi_config_inherit_stdout(config: *mut wasi_config_t) } #[no_mangle] -pub unsafe extern "C" fn wasi_config_set_stderr( +pub unsafe extern "C" fn wasi_config_set_stderr_file( config: *mut wasi_config_t, path: *const c_char, ) -> bool { diff --git a/crates/misc/dotnet/src/Interop.cs b/crates/misc/dotnet/src/Interop.cs index daa15b41a3bd..727acb19d3a4 100644 --- a/crates/misc/dotnet/src/Interop.cs +++ b/crates/misc/dotnet/src/Interop.cs @@ -854,7 +854,7 @@ public static extern unsafe void wasi_config_set_env( public static extern void wasi_config_inherit_env(WasiConfigHandle config); [DllImport(LibraryName)] - public static extern bool wasi_config_set_stdin( + public static extern bool wasi_config_set_stdin_file( WasiConfigHandle config, [MarshalAs(UnmanagedType.LPUTF8Str)] string path ); @@ -863,7 +863,7 @@ public static extern bool wasi_config_set_stdin( public static extern void wasi_config_inherit_stdin(WasiConfigHandle config); [DllImport(LibraryName)] - public static extern bool wasi_config_set_stdout( + public static extern bool wasi_config_set_stdout_file( WasiConfigHandle config, [MarshalAs(UnmanagedType.LPUTF8Str)] string path ); @@ -872,7 +872,7 @@ public static extern bool wasi_config_set_stdout( public static extern void wasi_config_inherit_stdout(WasiConfigHandle config); [DllImport(LibraryName)] - public static extern bool wasi_config_set_stderr( + public static extern bool wasi_config_set_stderr_file( WasiConfigHandle config, [MarshalAs(UnmanagedType.LPUTF8Str)] string path ); diff --git a/crates/misc/dotnet/src/WasiBuilder.cs b/crates/misc/dotnet/src/WasiBuilder.cs index 1ee7c27f3aae..cee85c258921 100644 --- a/crates/misc/dotnet/src/WasiBuilder.cs +++ b/crates/misc/dotnet/src/WasiBuilder.cs @@ -342,7 +342,7 @@ private void SetStandardIn(Interop.WasiConfigHandle config) if (!string.IsNullOrEmpty(_standardInputPath)) { - if (!Interop.wasi_config_set_stdin(config, _standardInputPath)) + if (!Interop.wasi_config_set_stdin_file(config, _standardInputPath)) { throw new InvalidOperationException($"Failed to set stdin to file '{_standardInputPath}'."); } @@ -359,7 +359,7 @@ private void SetStandardOut(Interop.WasiConfigHandle config) if (!string.IsNullOrEmpty(_standardOutputPath)) { - if (!Interop.wasi_config_set_stdout(config, _standardOutputPath)) + if (!Interop.wasi_config_set_stdout_file(config, _standardOutputPath)) { throw new InvalidOperationException($"Failed to set stdout to file '{_standardOutputPath}'."); } @@ -376,7 +376,7 @@ private void SetStandardError(Interop.WasiConfigHandle config) if (!string.IsNullOrEmpty(_standardErrorPath)) { - if (!Interop.wasi_config_set_stderr(config, _standardErrorPath)) + if (!Interop.wasi_config_set_stderr_file(config, _standardErrorPath)) { throw new InvalidOperationException($"Failed to set stderr to file '{_standardErrorPath}'."); }