File: environment.wit

package info (click to toggle)
rust-wasmtime 26.0.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 48,492 kB
  • sloc: ansic: 4,003; sh: 561; javascript: 542; cpp: 254; asm: 175; ml: 96; makefile: 55
file content (22 lines) | stat: -rw-r--r-- 811 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@since(version = 0.2.0)
interface environment {
  /// Get the POSIX-style environment variables.
  ///
  /// Each environment variable is provided as a pair of string variable names
  /// and string value.
  ///
  /// Morally, these are a value import, but until value imports are available
  /// in the component model, this import function should return the same
  /// values each time it is called.
  @since(version = 0.2.0)
  get-environment: func() -> list<tuple<string, string>>;

  /// Get the POSIX-style arguments to the program.
  @since(version = 0.2.0)
  get-arguments: func() -> list<string>;

  /// Return a path that programs should use as their initial current working
  /// directory, interpreting `.` as shorthand for this.
  @since(version = 0.2.0)
  initial-cwd: func() -> option<string>;
}