Skip to content

Commit 1dd4f0f

Browse files
committed
fancy graph UwUwU
1 parent 4ac507f commit 1dd4f0f

File tree

5 files changed

+108
-2
lines changed

5 files changed

+108
-2
lines changed

.github/workflows/deploy_mdbook.yml

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12+
- name: Install mdbook-skill-tree
13+
run: cargo install --git https://github.com/nikomatsakis/skill-tree.git mdbook-skill-tree
14+
continue-on-error: true # we don't care if this is already cached
15+
16+
- name: Install skill tree files
17+
run: mdbook-skill-tree install
1218
- uses: XAMPPRocky/deploy-mdbook@v1
1319
with:
1420
token: ${{ secrets.GITHUB_TOKEN }}

SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- [📜 Charter](./CHARTER.md)
55
- [🔮 The vision](./vision.md)
66
- [🙋‍♀️ Cast of characters](./vision/characters.md)
7+
- [🔀 Skill Tree](./skill-tree.md)
78
- [😱 Status quo](./vision/status_quo.md)
89
- [Array defaults](./vision/status_quo/array_default.md)
910
- [Array split first method](./vision/status_quo/split_first.md)

book.toml

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ multilingual = false
55
src = "."
66
title = "Const Generics Project Group"
77

8+
[preprocessor.skill-tree]
9+
command = "mdbook-skill-tree"
10+
811
[output.html]
9-
no-section-label=true
10-
git-repository-url="https://github.com/rust-lang/project-const-generics"
12+
no-section-label = true
13+
git-repository-url = "https://github.com/rust-lang/project-const-generics"
14+
additional-js = ["viz.js", "panzoom.min.js", "full.render.js", "skill-tree.js"]
15+
additional-css = ["skill-tree.css", "skill-tree-finetuning.css"]

skill-tree-finetuning.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:root {
2+
--content-max-width: 2000px;
3+
}

skill-tree.md

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Skill tree for const generics features
2+
3+
```skill-tree
4+
[[group]]
5+
name = "min_cg"
6+
label = "MIN CONST GENERICS"
7+
description = ["Minimum subset of const generics only allowing `const N: {integer} | bool | char` and fully concrete constants"]
8+
href = "https://github.com/rust-lang/rust/pull/79135"
9+
items = []
10+
11+
[[group]]
12+
name = "valtree"
13+
label = "VALTREES"
14+
description = ["Use valtrees in all type level constants"]
15+
items = [
16+
{ label = "Design of structural equality is worked out" },
17+
{ label = "Valtrees are implemented" },
18+
]
19+
20+
[[group]]
21+
name = "min_defaults"
22+
label = "CONCRETE CONST DEFAULTS"
23+
description = ["Permit concrete defaults on traits/adts"]
24+
items = []
25+
requires = ["min_cg"]
26+
27+
[[group]]
28+
name = "generic_defaults"
29+
label = "GENERIC CONST DEFAULTS"
30+
description = ["Permit generic defaults on traits/adts"]
31+
items = [
32+
{ label = "Disallow usage of forward declared params via param env" },
33+
{ label = "Decide when a generic default is considered well formed" },
34+
]
35+
requires = ["min_defaults"]
36+
37+
[[group]]
38+
name = "param_tys"
39+
label = "MORE CONST PARAM TYPES"
40+
description = ["Permit more types to be as the type of a const generic"]
41+
items = [
42+
{ label = "A `Constable` that that signifies a type is valid to use as a const param type" },
43+
{ label = "Generic const param types i.e. `T: Constable, const N: T`" },
44+
{ label = "Consider `impl<const N: usize> Trait<{ Some(N) }> for ()` to constrain `N`" },
45+
]
46+
requires = ["valtree", "min_cg"]
47+
48+
[[group]]
49+
name = "exhaustiveness"
50+
label = "IMPL EXHAUSTIVENESS"
51+
description = ["Allow separate impls to be used to fulfill `for<const N: usize> (): Trait<N>`"]
52+
items = []
53+
requires = ["param_tys"]
54+
55+
[[group]]
56+
name = "min_generic_consts"
57+
label = "MIN GENERIC CONSTANTS"
58+
description = ["Allow type level constants to be generic i.e. `N + 1`"]
59+
items = [
60+
{ label = "Add a where clause that requires a given expression to be evaluatable e.g. `where evaluatable { N - 1 }`" },
61+
{ label = "Unused substs make it hard to tell if a const is concrete or generic and breaks unsize coercion in some cases" },
62+
{ label = "Don't eagerly error when evaluating constants during selection" },
63+
]
64+
requires = ["min_cg"]
65+
66+
[[group]]
67+
name = "generic_consts"
68+
label = "GENERIC CONSTANTS"
69+
description = ["Allow type level constants but better ✨"]
70+
items = [
71+
{ label = "Allow writing a where clause that requires a condition to hold e.g. `where { N > 2 }`" },
72+
{ label = "Some things can always evaluate and should not need a where clause e.g. `{ N == M }` `{ N / 1 }`" },
73+
{ label = "If possible `where { N > 0 }` should imply `N - 1` is evaluatable" },
74+
]
75+
requires = ["min_generic_consts"]
76+
77+
[[group]]
78+
name = "assoc_const_bounds"
79+
label = "ASSOCIATED CONST BOUNDS"
80+
description = ["Permit where `where T: Trait<ASSOC = 10>`"]
81+
items = []
82+
requires = ["min_generic_consts"]
83+
84+
[[group]]
85+
name = "arg_infer"
86+
label = "GENERIC ARG CONST INFER"
87+
description = ["Permit using `_` for generic args"]
88+
href = "https://github.com/rust-lang/rust/pull/83484"
89+
items = []
90+
requires = ["min_cg"]
91+
```

0 commit comments

Comments
 (0)