Show / Hide Table of Contents

Class WasiConfiguration

Represents a WASI configuration.

Inheritance
System.Object
WasiConfiguration
Namespace: Wasmtime
Assembly: Wasmtime.Dotnet.dll
Syntax
public class WasiConfiguration : object

Methods

| Improve this Doc View Source

WithArg(String)

Adds a command line argument to the configuration.

Declaration
public WasiConfiguration WithArg(string arg)
Parameters
Type Name Description
System.String arg

The command line argument to add.

Returns
Type Description
WasiConfiguration

Returns the current configuration.

| Improve this Doc View Source

WithArgs(IEnumerable<String>)

Adds multiple command line arguments to the configuration.

Declaration
public WasiConfiguration WithArgs(IEnumerable<string> args)
Parameters
Type Name Description
IEnumerable<System.String> args

The command line arguments to add.

Returns
Type Description
WasiConfiguration

Returns the current configuration.

| Improve this Doc View Source

WithArgs(ReadOnlySpan<String>)

Adds multiple command line arguments to the configuration.

Declaration
public WasiConfiguration WithArgs(ReadOnlySpan<string> args)
Parameters
Type Name Description
ReadOnlySpan<System.String> args

The command line arguments to add.

Returns
Type Description
WasiConfiguration

Returns the current configuration.

| Improve this Doc View Source

WithArgs(String[])

Adds multiple command line arguments to the configuration.

Declaration
public WasiConfiguration WithArgs(params string[] args)
Parameters
Type Name Description
System.String[] args

The command line arguments to add.

Returns
Type Description
WasiConfiguration

Returns the current configuration.

| Improve this Doc View Source

WithEnvironmentVariable(String, String)

Adds an environment variable to the configuration.

Declaration
public WasiConfiguration WithEnvironmentVariable(string name, string value)
Parameters
Type Name Description
System.String name

The name of the environment variable.

System.String value

The value of the environment variable.

Returns
Type Description
WasiConfiguration

Returns the current configuration.

| Improve this Doc View Source

WithEnvironmentVariables(IEnumerable<(String, String)>)

Adds multiple environment variables to the configuration.

Declaration
public WasiConfiguration WithEnvironmentVariables(IEnumerable<(string, string)> vars)
Parameters
Type Name Description
IEnumerable<System.ValueTuple<System.String, System.String>> vars

The name-value tuples of the environment variables to add.

Returns
Type Description
WasiConfiguration

Returns the current configuration.

| Improve this Doc View Source

WithInheritedArgs()

Sets the configuration to inherit command line arguments.

Declaration
public WasiConfiguration WithInheritedArgs()
Returns
Type Description
WasiConfiguration

Returns the current configuration.

Remarks

Any explicitly specified command line arguments will be removed.

| Improve this Doc View Source

WithInheritedEnvironment()

Sets the configuration to inherit environment variables.

Declaration
public WasiConfiguration WithInheritedEnvironment()
Returns
Type Description
WasiConfiguration

Returns the current configuration.

Remarks

Any explicitly specified environment variables will be removed.

| Improve this Doc View Source

WithInheritedStandardError()

Sets the configuration to inherit stderr.

Declaration
public WasiConfiguration WithInheritedStandardError()
Returns
Type Description
WasiConfiguration

Returns the current configuration.

Remarks

Any explicitly specified stderr file will be removed.

| Improve this Doc View Source

WithInheritedStandardInput()

Sets the configuration to inherit stdin.

Declaration
public WasiConfiguration WithInheritedStandardInput()
Returns
Type Description
WasiConfiguration

Returns the current configuration.

Remarks

Any explicitly specified stdin file will be removed.

| Improve this Doc View Source

WithInheritedStandardOutput()

Sets the configuration to inherit stdout.

Declaration
public WasiConfiguration WithInheritedStandardOutput()
Returns
Type Description
WasiConfiguration

Returns the current configuration.

Remarks

Any explicitly specified stdout file will be removed.

| Improve this Doc View Source

WithPreopenedDirectory(String, String)

Adds a preopen directory to the configuration.

Declaration
public WasiConfiguration WithPreopenedDirectory(string path, string guestPath)
Parameters
Type Name Description
System.String path

The path to the directory to add.

System.String guestPath

The path the guest will use to open the directory.

Returns
Type Description
WasiConfiguration

Returns the current configuration.

| Improve this Doc View Source

WithStandardError(String)

Sets the configuration to use the given file path as stderr.

Declaration
public WasiConfiguration WithStandardError(string path)
Parameters
Type Name Description
System.String path

The file to use as stderr.

Returns
Type Description
WasiConfiguration

Returns the current configuration.

| Improve this Doc View Source

WithStandardInput(String)

Sets the configuration to use the given file path as stdin.

Declaration
public WasiConfiguration WithStandardInput(string path)
Parameters
Type Name Description
System.String path

The file to use as stdin.

Returns
Type Description
WasiConfiguration

Returns the current configuration.

| Improve this Doc View Source

WithStandardOutput(String)

Sets the configuration to use the given file path as stdout.

Declaration
public WasiConfiguration WithStandardOutput(string path)
Parameters
Type Name Description
System.String path

The file to use as stdout.

Returns
Type Description
WasiConfiguration

Returns the current configuration.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX