dapr / dapr/docs

Wasm Binding: Reading commandline args

Open
#3,929 0 comments 0 reactions 0 assignees View on GitHub
content/missing-information
Dominant language
SCSS
Stars
1k
Forks
794
Avg merge
2d 8h
Merged PRs (30d)
7

Description

**What content needs to be created or modified?**

The existing documentation on [Wasm Binding](https://docs.dapr.io/reference/components-reference/supported-bindings/wasm/) 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#.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.