From accc687b32850db487d923c048308b7a8c0d6352 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Mon, 20 Feb 2023 09:56:29 +0000 Subject: [PATCH] Add tint layering doc. A simple MD file to show the source set hierarchy which constrains where includes can go in Tint. Change-Id: Ia360430793faef01503260f29f88ef361bb91611 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120443 Commit-Queue: Ben Clayton Kokoro: Kokoro Reviewed-by: Ben Clayton --- docs/tint/layering.md | 68 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 docs/tint/layering.md diff --git a/docs/tint/layering.md b/docs/tint/layering.md new file mode 100644 index 0000000000..13e3626921 --- /dev/null +++ b/docs/tint/layering.md @@ -0,0 +1,68 @@ +# Tint Source Layering + +The `BUILD.gn` is setup with small source units for various components +in Tint. The hierarchy of sources almost matches to folder structure in +tint (except for `base` which is a mix of things in `src/tint` and +`src/tint/util`. + + +``` ++-----------------------------------------+ +| Readers | Writers | ++-----------------------------------------+ + | + V ++-----------------------------------------+ +| Val | Demangler | Inspector | Transform | ++-----------------------------------------+ + | | + +--------------+------------------------------+ + | | + V V ++-----------------------------------------+ +-----------+ +| AST | | Utils IO | ++-----------------------------------------+ +-----------+ + | | + V | ++-----------------------------------------+ | +| Program | Sem | | ++-----------------------------------------+ | + | | + V | ++-----------------------------------------+ | +| AST Hdrs | | +| (program and sem cause a cycle) | | ++-----------------------------------------+ | + | | + V | ++-----------------------------------------+ | +| Clone Context Hdrs | | +| (program and sem cause a cycle) | | ++-----------------------------------------+ | + | | + V | ++-----------------------------------------+ | +| Constant | | ++-----------------------------------------+ | + | | + V | ++-----------------------------------------+ | +| Types | | ++-----------------------------------------+ | + | | + V | ++-----------------------------------------+ | +| Builtin | | ++-----------------------------------------+ | + | | + |------------------------------+ + V ++-----------------------------------------+ +| Base | ++-----------------------------------------+ + | + V ++-----------------------------------------+ +-------------+ +| Text (unicode) | | Initializer | ++-----------------------------------------+ +-------------+ +```