diff options
Diffstat (limited to 'web/tvixbolt/src')
-rw-r--r-- | web/tvixbolt/src/index.css | 7 | ||||
-rw-r--r-- | web/tvixbolt/src/index.html | 21 | ||||
-rw-r--r-- | web/tvixbolt/src/lib.rs (renamed from web/tvixbolt/src/main.rs) | 4 |
3 files changed, 31 insertions, 1 deletions
diff --git a/web/tvixbolt/src/index.css b/web/tvixbolt/src/index.css new file mode 100644 index 000000000000..95bd7d098362 --- /dev/null +++ b/web/tvixbolt/src/index.css @@ -0,0 +1,7 @@ +.footer { + text-align: right; +} + +.lod { + text-align: center; +} diff --git a/web/tvixbolt/src/index.html b/web/tvixbolt/src/index.html new file mode 100644 index 000000000000..a938c4f4ea5e --- /dev/null +++ b/web/tvixbolt/src/index.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + <head> + <meta content="text/html;charset=utf-8" http-equiv="Content-Type"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://static.tvl.su/latest/terminal.min.css"> + <link rel="stylesheet" href="index.css"> + <title>Tvixbolt</title> + </head> + <body> + <script type="module"> + import init, { main } from './tvixbolt.js'; + + async function run() { + await init(); + main(); + } + + run(); + </script> + </body> diff --git a/web/tvixbolt/src/main.rs b/web/tvixbolt/src/lib.rs index 2e68e03fb0ba..1f47b0eaf59d 100644 --- a/web/tvixbolt/src/main.rs +++ b/web/tvixbolt/src/lib.rs @@ -7,6 +7,7 @@ use std::fmt::Write; use serde::{Deserialize, Serialize}; use tvix_eval::observer::{DisassemblingObserver, TracingObserver}; +use wasm_bindgen::prelude::wasm_bindgen; use web_sys::HtmlDetailsElement; use web_sys::HtmlTextAreaElement; use yew::prelude::*; @@ -310,6 +311,7 @@ fn eval(model: &Model) -> Output { out } -fn main() { +#[wasm_bindgen] +pub fn main() { yew::start_app::<Model>(); } |