docs icon indicating copy to clipboard operation
docs copied to clipboard

Wasm Binding: Reading commandline args

Open Zhiyuan-Amos opened this issue 1 year ago • 0 comments

What content needs to be created or modified?

The existing documentation on Wasm Binding writes that a Wasm program can be invoked with "commandline args or environment variables to it".

I compiled my C# program into Wasm and tried to obtain the commandline args using the following code, and all options failed to work (I'm still not sure how to get it to work):

  1. Environment.GetEnvironmentVariables()
  2. Environment.GetCommandLineArgs()
  3. args
  4. Console.In.ReadLine()

I'm using the request body located at the end of the documentation.

Describe the solution you'd like

Having examples of how to read these commandline args in various languages, including C#.

Zhiyuan-Amos avatar Dec 29 '23 07:12 Zhiyuan-Amos