imports property

Import callbacks keyed by canonical WIT adapter names.

Implementation

late final Map<String, WASIComponentWitAdapterCallback> imports =
    Map<String, WASIComponentWitAdapterCallback>.unmodifiable({
      'wasi:random/random@0.3.0.get-random-bytes': (args) =>
          _secureRandomBytes(args.single),
      'wasi:random/random@0.3.0.get-random-u64': (_) => _secureRandomU64(),
      'wasi:random/insecure@0.3.0.get-insecure-random-bytes': (args) =>
          _randomBytes(args.single, _insecureRandom),
      'wasi:random/insecure@0.3.0.get-insecure-random-u64': (_) =>
          _nextU64(_insecureRandom),
      'wasi:random/insecure-seed@0.3.0.get-insecure-seed': (_) =>
          _insecureSeedTuple(),
    });