Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienos.com/blob/main/crates/site-builder/src/components/lab.rs # aienos.com Source of www.aienos.com, served from my own hardware Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienos.com / crates / site-builder / src / components / lab.rs` 69 lines · 4142 bytes Raw Blame History 1 //! /lab/: seeded Omega owns the page structure, the browser client and its run worker 2 //! (om/lab-page/lab.om and client.om, regenerated by om/lab-page/check.sh). 3 use maud::{html, Markup, PreEscaped}; 4 pub const TITLE: &str = "Omega Lab: write a kernel, run it in one click | AienOS"; 5 pub const DESCRIPTION: &str = "Write and run a data-parallel Omega kernel in your browser as WebAssembly, compile edits on my DGX Spark, and inspect dated execution receipts and current limits."; 6 pub const URL: &str = "https://www.aienos.com/lab/"; 7 pub const PAGE: &str = include_str!("../../../../om/lab-page/main.html"); 8 pub fn render_lab_page() -> Markup { html! { (PreEscaped(PAGE)) } } 9 pub fn render_lab_entry() -> Markup { 10 html! { 11 a href="/lab/" style="display:block;padding:18px 24px;text-align:center;background:var(--bg-base);border-bottom:1px solid var(--border-subtle);color:var(--text-primary);" { 12 strong style="color:var(--accent-green);font-family:var(--font-mono);" { "OMEGA LAB" } 13 " · Write a kernel, run it in your browser in one click. Nothing to install. " 14 span style="text-decoration:underline;text-underline-offset:4px;" { "Open the lab →" } 15 } 16 } 17 } 18 #[cfg(test)] 19 mod tests { 20 use super::*; 21 use sha2::{Digest, Sha256}; 22 #[test] 23 fn lab_generated_artifacts_match_hashes() { 24 for (bytes, receipt) in [ 25 (PAGE.as_bytes(), include_str!("../../../../om/lab-page/main.html.sha256")), 26 (include_bytes!("../../../../public/js/lab.js").as_slice(), include_str!("../../../../om/lab-page/lab.js.sha256")), 27 (include_bytes!("../../../../public/js/lab-worker.js").as_slice(), include_str!("../../../../om/lab-page/lab-worker.js.sha256")), 28 ] { 29 assert_eq!(format!("{:x}", Sha256::digest(bytes)), receipt.split_whitespace().next().expect("digest")); 30 } 31 let published = include_str!("../../../../om/lab-page/published.sha256"); 32 for (bytes, name) in [ 33 (include_bytes!("../../../../public/lab/axpy.wasm").as_slice(), "axpy.wasm"), 34 (include_bytes!("../../../../public/lab/record.tsv").as_slice(), "record.tsv"), 35 ] { 36 let line = published.lines().find(|l| l.ends_with(name)).expect(name); 37 assert_eq!(format!("{:x}", Sha256::digest(bytes)), line.split_whitespace().next().expect("digest")); 38 } 39 } 40 #[test] 41 fn lab_keeps_its_evidence_boundaries() { 42 for text in ["NOT_RUN", "Take it home: not open yet.", "id=\"lab-src\"", "ret add mul a x y", "fn axpy", "PASS"] { 43 assert!(PAGE.contains(text), "missing {text}"); 44 } 45 for gone in ["radicle", "rad:z", "rad clone", "/rad/"] { 46 assert!(!PAGE.to_ascii_lowercase().contains(gone), "Radicle pointer: {gone}"); 47 } 48 assert!(!PAGE.contains("