docs: rework template and add stages framework
This commit is contained in:
parent
6217a984a2
commit
3746726245
5 changed files with 152 additions and 22 deletions
79
docs/design/graphics.typ
Normal file
79
docs/design/graphics.typ
Normal file
|
@ -0,0 +1,79 @@
|
|||
#import "@preview/cetz:0.1.2"
|
||||
#import cetz.draw: *
|
||||
|
||||
// quick reference
|
||||
// - `graphic` is for inline icons/images
|
||||
// - `canvas` is for centered more prominent stuff
|
||||
// - `group` can be used in either of ^, but not standalone
|
||||
|
||||
#let graphic(what) = box({
|
||||
cetz.canvas({
|
||||
// any preamble-ish stuff can go here
|
||||
set-style(
|
||||
mark: (angle: 90deg)
|
||||
)
|
||||
|
||||
what
|
||||
})
|
||||
})
|
||||
|
||||
#let canvas(what) = {
|
||||
align(center, graphic(what))
|
||||
}
|
||||
|
||||
|
||||
// smaller stuff
|
||||
|
||||
#let arrow(length: 1cm, lift: 4pt, stroke: 1pt) = graphic({
|
||||
line((0, lift), (rel: (length, 0)), mark: (end: ">", stroke: stroke))
|
||||
|
||||
// hack for the bounding box bottom
|
||||
// so that `lift` even has any effect
|
||||
line((0, 0), (0, 0), stroke: none)
|
||||
})
|
||||
|
||||
// larger stuff
|
||||
|
||||
#let nodes(
|
||||
distance: 3cm,
|
||||
arrow-spacing: 0.15cm,
|
||||
// cetz will support rounded rects in 0.2.0
|
||||
style: (frame: "rect", padding: 0.1cm),
|
||||
..labels,
|
||||
) = group({
|
||||
let labels = labels.pos()
|
||||
|
||||
// draw each label itself
|
||||
for (i, label) in labels.enumerate() {
|
||||
if i != 0 {
|
||||
set-origin((distance, 0))
|
||||
}
|
||||
content((0, 0), name: "label-" + str(i), label, ..style)
|
||||
}
|
||||
|
||||
// then draw an arrow from each to each
|
||||
// since an arrow is between two, the last one can't be connected with the "next-to-last" one
|
||||
// so we leave it out
|
||||
for i in range(labels.len() - 1) {
|
||||
line(
|
||||
(rel: (arrow-spacing, 0), to: "label-" + str(i) + ".right"),
|
||||
(rel: (-arrow-spacing, 0), to: "label-" + str(i + 1) + ".left"),
|
||||
mark: (end: ">"),
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
#let stages-overview = canvas({
|
||||
nodes(
|
||||
[Source],
|
||||
[Graph IR],
|
||||
[Optimizer],
|
||||
[Compiler],
|
||||
[VM Bytecode],
|
||||
[VM],
|
||||
)
|
||||
})
|
||||
|
||||
// literally just for standalone display of the graphics alone
|
||||
#import "../template.typ": conf
|
||||
#show: conf
|
31
docs/design/iowo-design.typ
Normal file
31
docs/design/iowo-design.typ
Normal file
|
@ -0,0 +1,31 @@
|
|||
#import "../template.typ": conf
|
||||
#import "graphics.typ"
|
||||
|
||||
#show: conf.with(title: [iOwO design], subtitle: [don't worry, we're just dreaming])
|
||||
#show ">": graphics.arrow()
|
||||
|
||||
= Type data model
|
||||
|
||||
== Requirements
|
||||
|
||||
- Color-aware
|
||||
- It can handle colors and colorspaces for images
|
||||
- ocio????
|
||||
- number/number type support
|
||||
- custom types (structs/enums)
|
||||
- algebraic enums
|
||||
- traits (`Numeric`...)
|
||||
|
||||
= Execution stages
|
||||
|
||||
#graphics.stages-overview
|
||||
|
||||
== Source > Graph IR
|
||||
|
||||
== Graph IR > VM Bytecode
|
||||
|
||||
=== Optimizer
|
||||
|
||||
=== Compiler
|
||||
|
||||
== VM Bytecode > VM
|
|
@ -1,16 +0,0 @@
|
|||
#import "../template.typ": conf
|
||||
#show: doc => conf(
|
||||
doc
|
||||
)
|
||||
|
||||
= Type data model
|
||||
|
||||
== Requirements
|
||||
|
||||
- Color-aware
|
||||
- It can handle colors and colorspaces for images
|
||||
- ocio????
|
||||
- number/number type support
|
||||
- custom types (structs/enums)
|
||||
- algebraic enums
|
||||
- traits (`Numeric`...)
|
Loading…
Add table
Add a link
Reference in a new issue