Commit 2f62f66
committed
Implement a composition graph library.
This commit implements a composition graph library that will serve as the basis
for how WAC does AST resolution in the near future.
The inspiration comes from the existing `CompositionGraph` API in
`wasm-compose`, except this API is more flexible, allowing a composition graph
to define its own types, have explicit exports, and export any node in the
graph.
The type representation present in `wac-parser` has been extracted to its own
crate, `wac-types`. It will be shared in the future between the parser and the
graph library.
As a result, a chunk of this new code is just copied out of `wac-parser`. Once
the graph library is merged, a follow-up commit will eliminate the duplicated
code and change `wac-parser` to resolve ASTs to a `CompositionGraph`.1 parent 7b2f728 commit 2f62f66
21 files changed
Lines changed: 6580 additions & 11 deletions
File tree
- crates
- wac-graph
- src
- tests
- graphs/simple
- wac-parser/src/resolution
- wac-resolver
- wac-types
- src
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| 82 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments