dotnet-wasi-sdk
dotnet-wasi-sdk copied to clipboard
How can you receive command line args?
// Program.cs
Console.WriteLine();
string[] arguments = Environment.GetCommandLineArgs();
Console.WriteLine("GetCommandLineArgs: {0}", string.Join(", ", arguments));
dotnet run hello # dotnet run -- hello ; wasmtime <path> hello ; wasmtime <path> -- hello
# GetCommandLineArgs:
# expected: GetCommandLineArgs: <path>, hello