wit-bindgen-cli 0.57.1

CLI tool to generate bindings for WIT documents and the component model.
package test:resource-alias-redux;

interface resource-alias1 {
  resource thing {
    constructor(s: string);
    get: func() -> string;
  }

  record foo { thing: thing }

  a: func(f: foo) -> list<thing>;
}

interface resource-alias2 {
  use resource-alias1.{thing, foo as bar};

  record foo { thing: thing }

  b: func(f: foo, g: bar) -> list<thing>;
}

world test {
  export resource-alias1;
  export resource-alias2;

  export the-test: interface {
    use resource-alias1.{thing};
    test: func(things: list<thing>) -> list<thing>;
  }
}

world runner {
  import resource-alias1;
  import resource-alias2;

  import the-test: interface {
    use resource-alias1.{thing};
    test: func(things: list<thing>) -> list<thing>;
  }

  export run: func();
}