Sha256: 5c030b21fd9a02b81aed35d2a3ee5b14bd64c0f47866e2584c8058f5ce16833d

Contents?: true

Size: 1.82 KB

Versions: 24

Compression:

Stored size: 1.82 KB

Contents

package foo:foo;

interface resources {
  resource bar {
    constructor();
    static-a: static func() -> u32;
    method-a: func() -> u32;
  }

  bar-own-arg: func(x: own<bar>);
  bar-borrow-arg: func(x: borrow<bar>);
  bar-result: func() -> own<bar>;

  tuple-own-arg: func(x: tuple<own<bar>, u32>);
  tuple-borrow-arg: func(x: tuple<own<bar>, u32>);
  tuple-result: func() -> tuple<own<bar>, u32>;

  option-own-arg: func(x: option<own<bar>>);
  option-borrow-arg: func(x: option<borrow<bar>>);
  option-result: func() -> option<own<bar>>;

  result-own-arg: func(x: result<own<bar>>);
  result-borrow-arg: func(x: result<borrow<bar>>);
  result-result: func() -> result<own<bar>>;

  list-own-arg: func(x: list<own<bar>>);
  list-borrow-arg: func(x: list<borrow<bar>>);
  list-result: func() -> list<own<bar>>;

  record nested-own {
    nested-bar: own<bar>
  }

  record nested-borrow {
    nested-bar: borrow<bar>
  }

  record-own-arg: func(x: nested-own);
  record-borrow-arg: func(x: nested-borrow);
  record-result: func() -> nested-own;

  type some-handle = borrow<bar>;
  func-with-handle-typedef: func(x: some-handle);
}

world the-world {
  import resources;

  resource world-resource {
    constructor();

    foo: func();
    static-foo: static func();
  }

  import some-world-func: func() -> world-resource;
  export some-world-func2: func() -> world-resource;

  export uses-resource-transitively;

  import long-use-chain4;
}

interface transitive-interface-with-resource {
  resource foo;
}

interface uses-resource-transitively {
  use transitive-interface-with-resource.{foo};

  handle: func(x: foo);
}

interface long-use-chain4 {
  use long-use-chain3.{a};

  foo: func() -> a;
}
interface long-use-chain3 {
  use long-use-chain2.{a};
}
interface long-use-chain2 {
  use long-use-chain1.{a};
}
interface long-use-chain1 {
  resource a;
}

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
wasmtime-30.0.2 ./ext/cargo-vendor/wasmtime-component-macro-30.0.2/tests/codegen/resources-import.wit
wasmtime-29.0.0 ./ext/cargo-vendor/wasmtime-component-macro-29.0.0/tests/codegen/resources-import.wit
wasmtime-28.0.0 ./ext/cargo-vendor/wasmtime-component-macro-28.0.0/tests/codegen/resources-import.wit
wasmtime-27.0.0 ./ext/cargo-vendor/wasmtime-component-macro-27.0.0/tests/codegen/resources-import.wit
wasmtime-26.0.0 ./ext/cargo-vendor/wasmtime-component-macro-26.0.0/tests/codegen/resources-import.wit
wasmtime-25.0.2 ./ext/cargo-vendor/wasmtime-component-macro-25.0.2/tests/codegen/resources-import.wit
wasmtime-25.0.1 ./ext/cargo-vendor/wasmtime-component-macro-25.0.1/tests/codegen/resources-import.wit
wasmtime-25.0.0 ./ext/cargo-vendor/wasmtime-component-macro-25.0.0/tests/codegen/resources-import.wit
wasmtime-24.0.0 ./ext/cargo-vendor/wasmtime-component-macro-24.0.0/tests/codegen/resources-import.wit
wasmtime-23.0.2 ./ext/cargo-vendor/wasmtime-component-macro-23.0.2/tests/codegen/resources-import.wit
wasmtime-22.0.0 ./ext/cargo-vendor/wasmtime-component-macro-22.0.0/tests/codegen/resources-import.wit
wasmtime-21.0.1 ./ext/cargo-vendor/wasmtime-component-macro-21.0.1/tests/codegen/resources-import.wit
wasmtime-20.0.2 ./ext/cargo-vendor/wasmtime-component-macro-20.0.2/tests/codegen/resources-import.wit
wasmtime-20.0.0 ./ext/cargo-vendor/wasmtime-component-macro-20.0.0/tests/codegen/resources-import.wit
wasmtime-18.0.3 ./ext/cargo-vendor/wasmtime-component-macro-18.0.3/tests/codegen/resources-import.wit
wasmtime-17.0.1 ./ext/cargo-vendor/wasmtime-component-macro-17.0.1/tests/codegen/resources-import.wit
wasmtime-17.0.0 ./ext/cargo-vendor/wasmtime-component-macro-17.0.0/tests/codegen/resources-import.wit
wasmtime-16.0.0 ./ext/cargo-vendor/wasmtime-component-macro-16.0.0/tests/codegen/resources-import.wit
wasmtime-15.0.1 ./ext/cargo-vendor/wasmtime-component-macro-15.0.1/tests/codegen/resources-import.wit
wasmtime-15.0.0 ./ext/cargo-vendor/wasmtime-component-macro-15.0.0/tests/codegen/resources-import.wit