Skip to main content

qualia_core_db/
wasm_capabilities.rs

1//! Compile-time capability declarations for the supported WebAssembly profiles.
2//!
3//! This is the source of truth used by browser metadata and packaging docs. A
4//! capability belongs here only when its profile is covered by a wasm32 build.
5
6pub const ONTOLOGY_KERNEL: &[&str] = &[
7    "nquin-48-byte-abi",
8    "q-hash",
9    "n3-parser",
10    "shacl-property-validation",
11    "deontic-logic",
12    "epistemic-logic",
13    "paraconsistent-routing",
14    "temporal-ltl",
15    "description-logic",
16    "answer-set-programming",
17    "linear-logic",
18    "interaction-governance",
19];
20
21pub const PORTAL: &[&str] = &[
22    "nquin-48-byte-abi",
23    "json-ingest",
24    "cbor-ld-ingest",
25    "tensor-10d",
26    "spatial-encoding",
27    "webgpu-viewport",
28    "acoustic-plane",
29];
30
31pub const LOGIC: &[&str] = &[
32    "nquin-48-byte-abi",
33    "q-hash",
34    "n3-parser",
35    "turtle-parser",
36    "rdf-serialization",
37    "ntriples-query",
38    "query-compiler",
39    "shacl-property-validation",
40    "deontic-logic",
41    "epistemic-logic",
42    "paraconsistent-routing",
43    "temporal-ltl",
44    "description-logic",
45    "answer-set-programming",
46    "linear-logic",
47    "interaction-governance",
48    "lww-crdt",
49];
50
51pub const SCIENTIFIC: &[&str] = &[
52    "nquin-48-byte-abi",
53    "q-hash",
54    "n3-parser",
55    "turtle-parser",
56    "rdf-serialization",
57    "ntriples-query",
58    "query-compiler",
59    "shacl-property-validation",
60    "deontic-logic",
61    "epistemic-logic",
62    "paraconsistent-routing",
63    "temporal-ltl",
64    "description-logic",
65    "answer-set-programming",
66    "linear-logic",
67    "interaction-governance",
68    "lww-crdt",
69    "bioinformatics",
70    "clinical-risk",
71    "organic-chemistry",
72    "economics",
73    "symbolic-logic",
74    "numerical-solvers",
75    "control-theory",
76    "geometric-algebra",
77    "quantum-dft",
78];
79
80pub const LLM: &[&str] = &[
81    "nquin-48-byte-abi",
82    "q-hash",
83    "n3-parser",
84    "turtle-parser",
85    "rdf-serialization",
86    "ntriples-query",
87    "query-compiler",
88    "shacl-property-validation",
89    "deontic-logic",
90    "epistemic-logic",
91    "paraconsistent-routing",
92    "temporal-ltl",
93    "description-logic",
94    "answer-set-programming",
95    "linear-logic",
96    "interaction-governance",
97    "lww-crdt",
98    "bioinformatics",
99    "clinical-risk",
100    "organic-chemistry",
101    "economics",
102    "symbolic-logic",
103    "numerical-solvers",
104    "control-theory",
105    "geometric-algebra",
106    "quantum-dft",
107    "gguf-parser",
108    "q42-model-container",
109    "webgpu-inference",
110    "streaming-decode",
111];
112
113pub const PLAYGROUND: &[&str] = &[
114    "nquin-48-byte-abi",
115    "q-hash",
116    "n3-parser",
117    "turtle-parser",
118    "rdf-serialization",
119    "ntriples-query",
120    "query-compiler",
121    "shacl-property-validation",
122    "deontic-logic",
123    "epistemic-logic",
124    "paraconsistent-routing",
125    "temporal-ltl",
126    "description-logic",
127    "answer-set-programming",
128    "linear-logic",
129    "interaction-governance",
130    "lww-crdt",
131    "bioinformatics",
132    "clinical-risk",
133    "organic-chemistry",
134    "economics",
135    "symbolic-logic",
136    "numerical-solvers",
137    "control-theory",
138    "geometric-algebra",
139    "quantum-dft",
140    "wasm-playground-api",
141];
142
143pub const FULL: &[&str] = &[
144    "nquin-48-byte-abi",
145    "q-hash",
146    "json-ingest",
147    "cbor-ld-ingest",
148    "tensor-10d",
149    "spatial-encoding",
150    "webgpu-viewport",
151    "acoustic-plane",
152    "n3-parser",
153    "turtle-parser",
154    "rdf-serialization",
155    "ntriples-query",
156    "query-compiler",
157    "shacl-property-validation",
158    "deontic-logic",
159    "epistemic-logic",
160    "paraconsistent-routing",
161    "temporal-ltl",
162    "description-logic",
163    "answer-set-programming",
164    "linear-logic",
165    "interaction-governance",
166    "lww-crdt",
167    "bioinformatics",
168    "clinical-risk",
169    "organic-chemistry",
170    "economics",
171    "symbolic-logic",
172    "numerical-solvers",
173    "control-theory",
174    "geometric-algebra",
175    "quantum-dft",
176    "gguf-parser",
177    "q42-model-container",
178    "webgpu-inference",
179    "streaming-decode",
180    "wasm-playground-api",
181];
182
183/// Stable profile label for diagnostics and package manifests.
184pub const fn compiled_profile() -> &'static str {
185    if cfg!(feature = "wasm-full") {
186        "full"
187    } else if cfg!(feature = "wasm-playground") {
188        "playground"
189    } else if cfg!(feature = "wasm-ontology") {
190        "ontology-mcp-kernel"
191    } else if cfg!(feature = "wasm-llm") {
192        "llm"
193    } else if cfg!(feature = "wasm-logic") {
194        "logic"
195    } else if cfg!(feature = "wasm-scientific") {
196        "scientific"
197    } else if cfg!(feature = "portal") {
198        "portal"
199    } else {
200        "core"
201    }
202}
203
204/// Capabilities contributed by the selected top-level profile.
205pub const fn compiled_capabilities() -> &'static [&'static str] {
206    if cfg!(feature = "wasm-full") {
207        FULL
208    } else if cfg!(feature = "wasm-playground") {
209        PLAYGROUND
210    } else if cfg!(feature = "wasm-ontology") {
211        ONTOLOGY_KERNEL
212    } else if cfg!(feature = "wasm-llm") {
213        LLM
214    } else if cfg!(feature = "wasm-logic") {
215        LOGIC
216    } else if cfg!(feature = "wasm-scientific") {
217        SCIENTIFIC
218    } else if cfg!(feature = "portal") {
219        PORTAL
220    } else {
221        &[]
222    }
223}