Commit f586be1
authored
cm-async: Start to fill out
* cm-async: Start to fill out `{Future,Stream}Any`
This commit is the first step down the road of filling out the
preexisting, but empty/buggy, `FutureAny` and `StreamAny` types. These
are intended to behave similarly to `ResourceAny` where the embedder
doesn't have static knowledge ahead of time about the type of the
future/stream in use. Changes made here are:
* `ComponentType for {Stream,Future}Reader<T>` now correctly typecheck
the `T`.
* Conversion to/from `*Any` types now properly typechecks the payload
type against the expected type.
* `{Future,Stream}Any` now live in their own file with the matrix of
conversions to the typed variants.
* A `close` method was added to `*Any` types.
These types are not currently directly constructible but this will
likely be relaxed in the future. Additionally the host can't actually
use these values without knowing the type, which is another restriction
that will be relaxed in the future (aka implemented).
cc #11161
* Fix tests
* Skip a test on miri{Future,Stream}Any (#12142)1 parent 2fafa35 commit f586be1
File tree
10 files changed
+1154
-257
lines changed- crates
- misc/component-async-tests/tests/scenario
- wasmtime/src/runtime/component
- concurrent
- tests/all
- component_model
10 files changed
+1154
-257
lines changedLines changed: 43 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
| 555 | + | |
555 | 556 | | |
556 | 557 | | |
557 | 558 | | |
| |||
603 | 604 | | |
604 | 605 | | |
605 | 606 | | |
| 607 | + | |
606 | 608 | | |
607 | 609 | | |
608 | 610 | | |
| |||
663 | 665 | | |
664 | 666 | | |
665 | 667 | | |
| 668 | + | |
666 | 669 | | |
667 | 670 | | |
668 | 671 | | |
669 | 672 | | |
670 | 673 | | |
671 | 674 | | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
676 | 688 | | |
677 | 689 | | |
678 | 690 | | |
679 | 691 | | |
680 | | - | |
| 692 | + | |
681 | 693 | | |
682 | 694 | | |
683 | 695 | | |
| |||
687 | 699 | | |
688 | 700 | | |
689 | 701 | | |
690 | | - | |
691 | | - | |
692 | | - | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
693 | 715 | | |
694 | 716 | | |
695 | 717 | | |
| |||
770 | 792 | | |
771 | 793 | | |
772 | 794 | | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
783 | 802 | | |
784 | | - | |
785 | | - | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
786 | 809 | | |
787 | 810 | | |
788 | 811 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
99 | | - | |
100 | | - | |
| 99 | + | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
0 commit comments