|
668 | 668 | /// // By default this set is empty.
|
669 | 669 | /// additional_derives: [PartialEq, Eq, Hash, Clone],
|
670 | 670 | ///
|
671 |
| -/// // If the `world` being generated has any exports, then this option is |
672 |
| -/// // required. Each exported interface must have an entry here in addition |
673 |
| -/// // to a `world` key if the world has any top-level exported functions. |
674 |
| -/// // |
675 |
| -/// // Each entry in this map points to a type in Rust. The specified type |
676 |
| -/// // must implement the generated trait. |
677 |
| -/// exports: { |
678 |
| -/// // If the WIT world has top-level function exports, such as: |
679 |
| -/// // |
680 |
| -/// // world my-world { |
681 |
| -/// // export foo: func(); |
682 |
| -/// // } |
683 |
| -/// // |
684 |
| -/// // then this option specifies which type implements the world's |
685 |
| -/// // exported functions. |
686 |
| -/// world: MyWorld, |
687 |
| -/// |
688 |
| -/// // For each exported interface from a world a key is additionally |
689 |
| -/// // required. Each key must be a string of the form "a:b/c" |
690 |
| -/// // specifying the "WIT path" to the interface. For example: |
691 |
| -/// // |
692 |
| -/// // package my:package; |
693 |
| -/// // |
694 |
| -/// // interface my-interface { |
695 |
| -/// // foo: func(); |
696 |
| -/// // } |
697 |
| -/// // |
698 |
| -/// // world my-world { |
699 |
| -/// // export my-interface; |
700 |
| -/// // export wasi:random/insecure-seed; |
701 |
| -/// // } |
702 |
| -/// // |
703 |
| -/// // this would require these fields to be specified: |
704 |
| -/// "my:package/my-interface": MyInterface, |
705 |
| -/// "wasi:random/insecure-seed": MyInsecureSeed, |
706 |
| -/// |
707 |
| -/// // If an unnamed interface is used then the export's name is the key |
708 |
| -/// // to use: |
709 |
| -/// // |
710 |
| -/// // world my-world { |
711 |
| -/// // export foo: interface { |
712 |
| -/// // some-func: func(); |
713 |
| -/// // } |
714 |
| -/// // } |
715 |
| -/// // |
716 |
| -/// // would require: |
717 |
| -/// "foo": MyFoo, |
718 |
| -/// }, |
719 |
| -/// |
720 | 671 | /// // When generating bindings for imports it might be the case that
|
721 | 672 | /// // bindings were already generated in a different crate. For example
|
722 | 673 | /// // if your world refers to WASI types then the `wasi` crate already
|
|
0 commit comments