diff --git a/stdlib/src/web.rs b/stdlib/src/web.rs index 36ed5618..59bc2eda 100644 --- a/stdlib/src/web.rs +++ b/stdlib/src/web.rs @@ -378,6 +378,200 @@ fn dsl_to_html_inner(val: &RuntimeValue, html: &mut String) { } } +fn web_start(ctx: &mut RuntimeContext, args: Vec) -> Result { + if !ctx.config.capabilities.contains(&Capability::Network) { + return Err(RuntimeError::new( + techscript_runtime::error::RuntimeErrorKind::InvalidOperation( + "Security policy violation: Network capability is denied".to_string(), + ), + None, + None, + )); + } + let port = args[0].try_into_int().map_err(|e| { + RuntimeError::new( + techscript_runtime::error::RuntimeErrorKind::InvalidOperation(e.to_string()), + None, + None, + ) + })? as u16; + let content = args[1].to_string(); + *PAGE_CONTENT.lock().unwrap() = content; + if SERVER_RUNNING.load(Ordering::SeqCst) { + return Ok(RuntimeValue::Str("Server already running".to_string())); + } + SERVER_RUNNING.store(true, Ordering::SeqCst); + let server = match tiny_http::Server::http(format!("0.0.0.0:{}", port)) { + Ok(s) => Mutex::new(s), + Err(e) => { + SERVER_RUNNING.store(false, Ordering::SeqCst); + return Err(RuntimeError::new( + techscript_runtime::error::RuntimeErrorKind::InvalidOperation(format!( + "Failed to start server: {}", + e + )), + None, + None, + )); + } + }; + thread::spawn(move || { + while SERVER_RUNNING.load(Ordering::SeqCst) { + if let Ok(mut req) = server.lock().unwrap().recv() { + let page = PAGE_CONTENT.lock().unwrap(); + let r = tiny_http::Response::from_string(&*page).with_header( + tiny_http::Header::from_bytes( + &b"Content-Type"[..], + &b"text/html; charset=utf-8"[..], + ) + .expect("valid header"), + ); + let _ = req.respond(r); + } + } + }); + Ok(RuntimeValue::Str(format!("Server started on port {}", port))) +} + +fn web_page(_ctx: &mut RuntimeContext, args: Vec) -> Result { + let _path = args[0].to_string(); + let content = args[1].to_string(); + *PAGE_CONTENT.lock().unwrap() = content; + Ok(RuntimeValue::Null) +} + +fn web_serve(ctx: &mut RuntimeContext, args: Vec) -> Result { + if !ctx.config.capabilities.contains(&Capability::Network) { + return Err(RuntimeError::new( + techscript_runtime::error::RuntimeErrorKind::InvalidOperation( + "Security policy violation: Network capability is denied".to_string(), + ), + None, + None, + )); + } + let port = args[0].try_into_int().map_err(|e| { + RuntimeError::new( + techscript_runtime::error::RuntimeErrorKind::InvalidOperation(e.to_string()), + None, + None, + ) + })? as u16; + if SERVER_RUNNING.load(Ordering::SeqCst) { + return Ok(RuntimeValue::Str("Server already running".to_string())); + } + SERVER_RUNNING.store(true, Ordering::SeqCst); + let server = match tiny_http::Server::http(format!("0.0.0.0:{}", port)) { + Ok(s) => Mutex::new(s), + Err(e) => { + SERVER_RUNNING.store(false, Ordering::SeqCst); + return Err(RuntimeError::new( + techscript_runtime::error::RuntimeErrorKind::InvalidOperation(format!( + "Failed to start server: {}", + e + )), + None, + None, + )); + } + }; + thread::spawn(move || { + while SERVER_RUNNING.load(Ordering::SeqCst) { + if let Ok(mut req) = server.lock().unwrap().recv() { + let page = PAGE_CONTENT.lock().unwrap(); + let r = tiny_http::Response::from_string(&*page).with_header( + tiny_http::Header::from_bytes( + &b"Content-Type"[..], + &b"text/html; charset=utf-8"[..], + ) + .expect("valid header"), + ); + let _ = req.respond(r); + } + } + }); + Ok(RuntimeValue::Str(format!("Server started on port {}", port))) +} + +fn web_stop(_ctx: &mut RuntimeContext, _args: Vec) -> Result { + SERVER_RUNNING.store(false, Ordering::SeqCst); + Ok(RuntimeValue::Null) +} + +fn web_set_content(_ctx: &mut RuntimeContext, args: Vec) -> Result { + let new_content = args[0].to_string(); + *PAGE_CONTENT.lock().unwrap() = new_content; + Ok(RuntimeValue::Str("Content updated".to_string())) +} + +fn web_fetch(ctx: &mut RuntimeContext, args: Vec) -> Result { + if !ctx.config.capabilities.contains(&Capability::Network) { + return Err(RuntimeError::new( + techscript_runtime::error::RuntimeErrorKind::InvalidOperation( + "Security policy violation: Network capability is denied".to_string(), + ), + None, + None, + )); + } + let url = args[0].to_string(); + + if !is_safe_url(&url) { + return Err(RuntimeError::new( + techscript_runtime::error::RuntimeErrorKind::InvalidOperation( + format!("Access denied: the URL '{}' points to a blocked or internal destination (SSRF prevention).", url) + ), + None, + None, + )); + } + + let agent = ureq::builder() + .resolver(SafeResolver) + .redirects(0) + .build(); + let body = agent.get(&url) + .call() + .map_err(|e| { + RuntimeError::new( + techscript_runtime::error::RuntimeErrorKind::InvalidOperation( + e.to_string(), + ), + None, + None, + ) + })? + .into_string() + .map_err(|e| { + RuntimeError::new( + techscript_runtime::error::RuntimeErrorKind::InvalidOperation( + e.to_string(), + ), + None, + None, + ) + })?; + Ok(RuntimeValue::Str(body)) +} + +fn web_render_html(ctx: &mut RuntimeContext, _args: Vec) -> Result { + let env = ctx.global_env.borrow(); + let blocks = match env.lookup("_dsl_blocks") { + Ok(RuntimeValue::List { items, .. }) => items.borrow().clone(), + _ => return Ok(RuntimeValue::Str(String::new())), + }; + let mut html = String::new(); + for block in &blocks { + dsl_to_html_inner(block, &mut html); + } + Ok(RuntimeValue::Str(html)) +} + +fn web_render_dsl(_ctx: &mut RuntimeContext, args: Vec) -> Result { + let html = dsl_to_html(&args[0]); + Ok(RuntimeValue::Str(html)) +} + impl StdlibRegistry { pub fn register_web(&mut self) { let mut exports: HashMap> = HashMap::new(); @@ -387,65 +581,7 @@ impl StdlibRegistry { Rc::new(StdFunction { name: "start".to_string(), arity: 2, - callback: |ctx, args| { - if !ctx.config.capabilities.contains(&Capability::Network) { - return Err(RuntimeError::new( - techscript_runtime::error::RuntimeErrorKind::InvalidOperation( - "Security policy violation: Network capability is denied" - .to_string(), - ), - None, - None, - )); - } - let port = args[0].try_into_int().map_err(|e| { - RuntimeError::new( - techscript_runtime::error::RuntimeErrorKind::InvalidOperation( - e.to_string(), - ), - None, - None, - ) - })? as u16; - let content = args[1].to_string(); - *PAGE_CONTENT.lock().unwrap() = content; - if SERVER_RUNNING.load(Ordering::SeqCst) { - return Ok(RuntimeValue::Str("Server already running".to_string())); - } - SERVER_RUNNING.store(true, Ordering::SeqCst); - let server = match tiny_http::Server::http(format!("0.0.0.0:{}", port)) { - Ok(s) => Mutex::new(s), - Err(e) => { - SERVER_RUNNING.store(false, Ordering::SeqCst); - return Err(RuntimeError::new( - techscript_runtime::error::RuntimeErrorKind::InvalidOperation( - format!("Failed to start server: {}", e), - ), - None, - None, - )); - } - }; - thread::spawn(move || { - while SERVER_RUNNING.load(Ordering::SeqCst) { - if let Ok(mut req) = server.lock().unwrap().recv() { - let page = PAGE_CONTENT.lock().unwrap(); - let r = tiny_http::Response::from_string(&*page).with_header( - tiny_http::Header::from_bytes( - &b"Content-Type"[..], - &b"text/html; charset=utf-8"[..], - ) - .expect("valid header"), - ); - let _ = req.respond(r); - } - } - }); - Ok(RuntimeValue::Str(format!( - "Server started on port {}", - port - ))) - }, + callback: web_start, }), ); @@ -454,12 +590,7 @@ impl StdlibRegistry { Rc::new(StdFunction { name: "page".to_string(), arity: 2, - callback: |_ctx, args| { - let _path = args[0].to_string(); - let content = args[1].to_string(); - *PAGE_CONTENT.lock().unwrap() = content; - Ok(RuntimeValue::Null) - }, + callback: web_page, }), ); @@ -468,63 +599,7 @@ impl StdlibRegistry { Rc::new(StdFunction { name: "serve".to_string(), arity: 1, - callback: |ctx, args| { - if !ctx.config.capabilities.contains(&Capability::Network) { - return Err(RuntimeError::new( - techscript_runtime::error::RuntimeErrorKind::InvalidOperation( - "Security policy violation: Network capability is denied" - .to_string(), - ), - None, - None, - )); - } - let port = args[0].try_into_int().map_err(|e| { - RuntimeError::new( - techscript_runtime::error::RuntimeErrorKind::InvalidOperation( - e.to_string(), - ), - None, - None, - ) - })? as u16; - if SERVER_RUNNING.load(Ordering::SeqCst) { - return Ok(RuntimeValue::Str("Server already running".to_string())); - } - SERVER_RUNNING.store(true, Ordering::SeqCst); - let server = match tiny_http::Server::http(format!("0.0.0.0:{}", port)) { - Ok(s) => Mutex::new(s), - Err(e) => { - SERVER_RUNNING.store(false, Ordering::SeqCst); - return Err(RuntimeError::new( - techscript_runtime::error::RuntimeErrorKind::InvalidOperation( - format!("Failed to start server: {}", e), - ), - None, - None, - )); - } - }; - thread::spawn(move || { - while SERVER_RUNNING.load(Ordering::SeqCst) { - if let Ok(mut req) = server.lock().unwrap().recv() { - let page = PAGE_CONTENT.lock().unwrap(); - let r = tiny_http::Response::from_string(&*page).with_header( - tiny_http::Header::from_bytes( - &b"Content-Type"[..], - &b"text/html; charset=utf-8"[..], - ) - .expect("valid header"), - ); - let _ = req.respond(r); - } - } - }); - Ok(RuntimeValue::Str(format!( - "Server started on port {}", - port - ))) - }, + callback: web_serve, }), ); @@ -533,10 +608,7 @@ impl StdlibRegistry { Rc::new(StdFunction { name: "stop".to_string(), arity: 0, - callback: |_ctx, _args| { - SERVER_RUNNING.store(false, Ordering::SeqCst); - Ok(RuntimeValue::Null) - }, + callback: web_stop, }), ); @@ -545,11 +617,7 @@ impl StdlibRegistry { Rc::new(StdFunction { name: "set_content".to_string(), arity: 1, - callback: |_ctx, args| { - let new_content = args[0].to_string(); - *PAGE_CONTENT.lock().unwrap() = new_content; - Ok(RuntimeValue::Str("Content updated".to_string())) - }, + callback: web_set_content, }), ); @@ -558,55 +626,7 @@ impl StdlibRegistry { Rc::new(StdFunction { name: "fetch".to_string(), arity: 1, - callback: |ctx, args| { - if !ctx.config.capabilities.contains(&Capability::Network) { - return Err(RuntimeError::new( - techscript_runtime::error::RuntimeErrorKind::InvalidOperation( - "Security policy violation: Network capability is denied".to_string(), - ), - None, - None, - )); - } - let url = args[0].to_string(); - - if !is_safe_url(&url) { - return Err(RuntimeError::new( - techscript_runtime::error::RuntimeErrorKind::InvalidOperation( - format!("Access denied: the URL '{}' points to a blocked or internal destination (SSRF prevention).", url) - ), - None, - None, - )); - } - - let agent = ureq::builder() - .resolver(SafeResolver) - .redirects(0) - .build(); - let body = agent.get(&url) - .call() - .map_err(|e| { - RuntimeError::new( - techscript_runtime::error::RuntimeErrorKind::InvalidOperation( - e.to_string(), - ), - None, - None, - ) - })? - .into_string() - .map_err(|e| { - RuntimeError::new( - techscript_runtime::error::RuntimeErrorKind::InvalidOperation( - e.to_string(), - ), - None, - None, - ) - })?; - Ok(RuntimeValue::Str(body)) - }, + callback: web_fetch, }), ); @@ -615,18 +635,7 @@ impl StdlibRegistry { Rc::new(StdFunction { name: "render_html".to_string(), arity: 0, - callback: |ctx, _args| { - let env = ctx.global_env.borrow(); - let blocks = match env.lookup("_dsl_blocks") { - Ok(RuntimeValue::List { items, .. }) => items.borrow().clone(), - _ => return Ok(RuntimeValue::Str(String::new())), - }; - let mut html = String::new(); - for block in &blocks { - dsl_to_html_inner(block, &mut html); - } - Ok(RuntimeValue::Str(html)) - }, + callback: web_render_html, }), ); @@ -635,10 +644,7 @@ impl StdlibRegistry { Rc::new(StdFunction { name: "render_dsl".to_string(), arity: 1, - callback: |_ctx, args| { - let html = dsl_to_html(&args[0]); - Ok(RuntimeValue::Str(html)) - }, + callback: web_render_dsl, }), ); diff --git a/test_output.log b/test_output.log deleted file mode 100644 index d8364f42..00000000 --- a/test_output.log +++ /dev/null @@ -1,384 +0,0 @@ - Downloading crates ... - Downloaded plotters-svg v0.3.7 - Downloaded same-file v1.0.6 - Downloaded plotters-backend v0.3.7 - Downloaded alloca v0.4.0 - Downloaded ciborium v0.2.2 - Downloaded ciborium-ll v0.2.2 - Downloaded walkdir v2.5.0 - Downloaded tinytemplate v1.2.1 - Downloaded page_size v0.6.0 - Downloaded itertools v0.13.0 - Downloaded oorandom v11.1.5 - Downloaded criterion-plot v0.8.2 - Downloaded ciborium-io v0.2.2 - Downloaded criterion v0.8.2 - Downloaded regex v1.13.1 - Downloaded plotters v0.3.7 - Downloaded cast v0.3.0 - Downloaded anes v0.1.6 - Compiling unicode-ident v1.0.24 - Compiling cfg-if v1.0.4 - Compiling serde_core v1.0.229 - Compiling serde v1.0.229 - Compiling libc v0.2.189 - Compiling proc-macro2 v1.0.107 - Compiling memchr v2.8.3 - Compiling quote v1.0.47 - Compiling syn v3.0.3 - Compiling syn v2.0.119 - Compiling typenum v1.20.1 - Compiling rand_core v0.10.1 - Compiling zeroize v1.9.0 - Compiling shlex v2.0.1 - Compiling cc v1.4.3 - Compiling getrandom v0.4.3 - Compiling hybrid-array v0.4.14 - Compiling log v0.4.33 - Compiling simd-adler32 v0.3.10 - Compiling crossbeam-utils v0.8.22 - Compiling crypto-common v0.2.2 - Compiling bitflags v2.13.1 - Compiling adler2 v2.0.1 - Compiling itoa v1.0.18 - Compiling num-traits v0.2.19 - Compiling stable_deref_trait v1.2.1 - Compiling crc32fast v1.5.0 - Compiling winnow v1.0.4 - Compiling pin-project-lite v0.2.17 - Compiling miniz_oxide v0.9.1 - Compiling serde_derive v1.0.229 - Compiling strum_macros v0.28.0 - Compiling block-buffer v0.12.1 - Compiling zlib-rs v0.6.7 - Compiling strum v0.28.0 - Compiling equivalent v1.0.2 - Compiling zmij v1.0.23 - Compiling serde_json v1.0.151 - Compiling synstructure v0.13.2 - Compiling futures-core v0.3.34 - Compiling cmov v0.5.4 - Compiling zerofrom-derive v0.1.7 - Compiling ctutils v0.4.2 - Compiling crossbeam-epoch v0.9.20 - Compiling techscript_common v2.0.0 (/app/compiler/common) - Compiling smallvec v1.15.2 - Compiling flate2 v1.1.10 - Compiling techscript_syntax v2.0.0 (/app/compiler/syntax) - Compiling techscript_errors v2.0.0 (/app/compiler/errors) - Compiling zerofrom v0.1.8 - Compiling yoke-derive v0.8.2 - Compiling block-padding v0.4.2 - Compiling either v1.17.0 - Compiling inout v0.2.2 - Compiling crossbeam-deque v0.8.7 - Compiling enumflags2_derive v0.7.12 - Compiling cpufeatures v0.3.0 - Compiling rayon-core v1.13.0 - Compiling zerocopy-derive v0.8.56 - Compiling zerovec-derive v0.11.5 - Compiling yoke v0.8.3 - Compiling futures-io v0.3.34 - Compiling parking v2.2.1 - Compiling once_cell v1.21.4 - Compiling anyhow v1.0.104 - Compiling cipher v0.5.2 - Compiling displaydoc v0.2.7 - Compiling foldhash v0.2.0 - Compiling zerovec v0.11.7 - Compiling const-oid v0.10.2 - Compiling zerocopy v0.8.56 - Compiling digest v0.11.3 - Compiling hashbrown v0.17.1 - Compiling rayon v1.12.0 - Compiling techscript_ast v2.0.0 (/app/compiler/ast) - Compiling ring v0.17.14 - Compiling bytes v1.12.1 - Compiling indexmap v2.14.2 - Compiling toml_parser v1.1.3+spec-1.1.0 - Compiling percent-encoding v2.3.2 - Compiling arrayvec v0.7.8 - Compiling slab v0.4.12 - Compiling toml_edit v0.25.13+spec-1.1.0 - Compiling tinystr v0.8.4 - Compiling enumflags2 v0.7.12 - Compiling equator-macro v0.4.2 - Compiling half v2.7.1 - Compiling thiserror-impl v2.0.21 - Compiling rustls-pki-types v1.15.1 - Compiling getrandom v0.2.17 - Compiling encoding_rs v0.8.35 - Compiling litemap v0.8.3 - Compiling writeable v0.6.4 - Compiling cpubits v0.1.1 - Compiling untrusted v0.9.0 - Compiling fastrand v2.5.0 - Compiling linux-raw-sys v0.12.1 - Compiling tinyvec_macros v0.1.1 - Compiling tinyvec v1.12.0 - Compiling thiserror v2.0.21 - Compiling icu_locale_core v2.3.0 - Compiling equator v0.4.2 - Compiling rustix v1.1.4 - Compiling proc-macro-crate v3.5.0 - Compiling httparse v1.10.1 - Compiling libm v0.2.16 - Compiling zerotrie v0.2.5 - Compiling potential_utf v0.1.6 - Compiling zstd-sys v2.0.16+zstd.1.5.7 - Compiling event-listener v5.4.2 - Compiling zvariant_utils v4.2.0 - Compiling num-integer v0.1.47 - Compiling concurrent-queue v2.5.0 - Compiling errno v0.3.14 - Compiling base64 v0.23.1 - Compiling utf8_iter v1.0.4 - Compiling subtle v2.6.1 - Compiling icu_collections v2.3.0 - Compiling proc-macro2-diagnostics v0.10.1 - Compiling rustls v0.23.45 - Compiling signal-hook-registry v1.4.8 - Compiling num-bigint v0.4.8 - Compiling zvariant_derive v5.15.0 - Compiling event-listener-strategy v0.5.4 - Compiling icu_provider v2.3.0 - Compiling rustls-webpki v0.103.14 - Compiling aligned-vec v0.6.4 - Compiling fst v0.4.7 - Compiling futures-lite v2.6.1 - Compiling http v1.5.0 - Compiling serde_spanned v1.1.1 - Compiling toml_datetime v1.1.1+spec-1.1.0 - Compiling nom v8.0.0 - Compiling toml_writer v1.1.2+spec-1.1.0 - Compiling endi v1.1.1 - Compiling alloc-no-stdlib v2.0.4 - Compiling toml v1.1.6+spec-1.1.0 - Compiling alloc-stdlib v0.2.4 - Compiling ouroboros_macro v0.18.5 - Compiling ureq-proto v0.6.4 - Compiling v_frame v0.3.9 - Compiling pathfinder_simd v0.5.6 - Compiling num-rational v0.4.2 - Compiling icu_properties_data v2.3.0 - Compiling icu_normalizer_data v2.3.0 - Compiling aes v0.9.2 - Compiling webpki-roots v1.0.9 - Compiling sha2 v0.11.0 - Compiling as-slice v0.2.1 - Compiling static_assertions v1.1.0 - Compiling aliasable v0.1.3 - Compiling bytemuck v1.25.2 - Compiling utf8-zero v0.8.1 - Compiling ouroboros v0.18.5 - Compiling aligned v0.4.3 - Compiling icu_normalizer v2.3.0 - Compiling icu_properties v2.3.0 - Compiling pathfinder_geometry v0.5.1 - Compiling unicode-canonical-combining-class v1.0.0 - Compiling unicode-joining-type v1.0.0 - Compiling brotli-decompressor v5.0.3 - Compiling unicode-general-category v1.1.0 - Compiling ureq v3.4.2 - Compiling hyphenation_commons v0.8.4 - Compiling polling v3.11.0 - Compiling bincode v1.3.3 - Compiling zcheapstr v1.1.0 - Compiling arg_enum_proc_macro v0.3.4 - Compiling profiling-procmacros v1.0.18 - Compiling no_std_io2 v0.9.4 - Compiling async-task v4.7.1 - Compiling y4m v0.8.0 - Compiling zstd-safe v7.2.4 - Compiling ucd-trie v0.1.7 - Compiling num-conv v0.2.2 - Compiling glyph-names v0.2.0 - Compiling quick-error v2.0.1 - Compiling deranged v0.5.8 - Compiling rustc-hash v2.1.3 - Compiling powerfmt v0.2.0 - Compiling time-core v0.1.9 - Compiling allsorts-azul v0.17.2 - Compiling hyphenation v0.8.4 - Compiling av-scenechange v0.14.1 - Compiling time v0.3.55 - Compiling bitstream-io v4.10.0 - Compiling profiling v1.0.18 - Compiling zvariant v5.15.0 - Compiling async-io v2.6.0 - Compiling idna_adapter v1.2.2 - Compiling generic-array v0.14.7 - Compiling num-complex v0.4.6 - Compiling av1-grain v0.2.5 - Compiling async-channel v2.5.0 - Compiling unicode-normalization v0.1.25 - Compiling maybe-rayon v0.1.1 - Compiling hmac v0.13.0 - Compiling tracing-core v0.1.36 - Compiling itertools v0.14.0 - Compiling num-derive v0.4.2 - Compiling tracing-attributes v0.1.31 - Compiling serde_repr v0.1.21 - Compiling miniz_oxide v0.8.9 - Compiling raw-cpuid v11.6.0 - Compiling mmapio v0.9.1 - Compiling simd_helpers v0.1.0 - Compiling unicode-bidi v0.3.18 - Compiling pulp-wasm-simd-flag v0.1.1 - Compiling libbz2-rs-sys v0.2.5 - Compiling bumpalo v3.20.3 - Compiling new_debug_unreachable v1.0.6 - Compiling reborrow v0.5.5 - Compiling azul-simplecss v0.2.1 - Compiling imgref v1.12.2 - Compiling atomic-waker v1.1.2 - Compiling zune-core v0.5.3 - Compiling weezl v0.1.12 - Compiling xmlparser v0.13.6 - Compiling pulp v0.22.3 - Compiling zune-jpeg v0.5.15 - Compiling piper v0.2.5 - Compiling rav1e v0.8.1 - Compiling loop9 v0.1.5 - Compiling azul-css v0.0.16 - Compiling zopfli v0.8.3 - Compiling bzip2 v0.6.1 - Compiling rust-fontconfig v5.0.0 - Compiling libsqlite3-sys v0.38.2 - Compiling tracing v0.1.44 - Compiling pbkdf2 v0.13.0 - Compiling idna v1.1.0 - Compiling async-signal v0.2.14 - Compiling zbus_names v4.3.4 - Compiling slotmap v1.1.1 - Compiling zstd v0.13.3 - Compiling lzma-rust2 v0.16.5 - Compiling async-lock v3.4.2 - Compiling avif-serialize v0.8.9 - Compiling form_urlencoded v1.2.2 - Compiling sha1 v0.11.0 - Compiling chacha20 v0.10.1 - Compiling universal-hash v0.6.1 - Compiling async-trait v0.1.92 - Compiling zune-inflate v0.2.54 - Compiling fdeflate v0.3.7 - Compiling lebe v0.5.3 - Compiling grid v1.0.1 - Compiling fax v0.2.7 - Compiling unicode-segmentation v1.13.3 - Compiling color_quant v1.1.0 - Compiling unicode-properties v0.1.4 - Compiling ppmd-rust v1.4.0 - Compiling byteorder v1.5.0 - Compiling typed-path v0.12.3 - Compiling rgb v0.8.53 - Compiling byteorder-lite v0.1.0 - Compiling hex v0.4.3 - Compiling constant_time_eq v0.4.2 - Compiling deflate64 v0.1.12 - Compiling bit_field v0.10.3 - Compiling pxfm v0.1.30 - Compiling gl-context-loader v0.1.10 - Compiling azul-core v0.0.16 - Compiling zip v8.6.0 - Compiling exr v1.74.2 - Compiling moxcms v0.8.1 - Compiling image-webp v0.2.4 - Compiling ravif v0.13.0 - Compiling stringprep v0.1.5 - Compiling gif v0.14.2 - Compiling tiff v0.11.3 - Compiling taffy v0.10.1 - Compiling png v0.18.1 - Compiling polyval v0.7.3 - Compiling rand v0.10.2 - Compiling url v2.5.8 - Compiling async-process v2.5.0 - Compiling zbus_macros v5.19.0 - Compiling blocking v1.6.2 - Compiling block-buffer v0.10.4 - Compiling crypto-common v0.1.7 - Compiling async-executor v1.14.0 - Compiling qoi v0.4.1 - Compiling async-broadcast v0.7.2 - Compiling md-5 v0.11.0 - Compiling cbc v0.2.1 - Compiling ecb v0.2.0 - Compiling ordered-stream v0.2.0 - Compiling async-recursion v1.1.1 - Compiling uuid v1.26.1 - Compiling roxmltree v0.21.1 - Compiling regex-lite v0.1.9 - Compiling iana-time-zone v0.1.65 - Compiling weezl v0.2.1 - Compiling lru v0.18.2 - Compiling rangemap v1.8.0 - Compiling debug_unsafe v0.1.4 - Compiling xmlwriter v0.1.0 - Compiling base64 v0.22.1 - Compiling lopdf v0.44.0 - Compiling azul-layout v0.0.16 - Compiling atoi_simd v0.18.1 - Compiling chrono v0.4.45 - Compiling zbus v5.19.0 - Compiling image v0.25.10 - Compiling digest v0.10.7 - Compiling ghash v0.6.0 - Compiling blowfish v0.10.0 - Compiling xattr v1.6.1 - Compiling techscript_runtime v2.0.0 (/app/runtime/runtime) - Compiling codepage v0.1.2 - Compiling quick-xml v0.41.0 - Compiling hashlink v0.12.1 - Compiling ctr v0.10.1 - Compiling aead v0.6.1 - Compiling filetime v0.2.29 - Compiling csv-core v0.1.13 - Compiling fallible-iterator v0.3.0 - Compiling crc-catalog v2.5.0 - Compiling cpufeatures v0.2.17 - Compiling ascii v1.1.0 - Compiling fallible-streaming-iterator v0.1.9 - Compiling chunked_transfer v1.5.0 - Compiling httpdate v1.0.3 - Compiling fast-float2 v0.2.4 - Compiling ryu v1.0.23 - Compiling calamine v0.36.1 - Compiling csv v1.4.0 - Compiling tiny_http v0.12.0 - Compiling rusqlite v0.40.2 - Compiling sha-1 v0.10.1 - Compiling crc v3.4.0 - Compiling tar v0.4.46 - Compiling aes-gcm v0.11.1 - Compiling bcrypt v0.19.3 - Compiling notify-rust v4.18.1 - Compiling qrcode v0.14.1 - Compiling quick-xml v0.42.0 - Compiling md5 v0.8.1 - Compiling logos-codegen v0.16.1 - Compiling techscript_module_resolver v2.0.0 (/app/compiler/module_resolver) - Compiling techscript_parser v2.0.0 (/app/compiler/parser) - Compiling utf8parse v0.2.2 - Compiling anstyle-parse v1.0.0 - Compiling is_terminal_polyfill v1.70.2 - Compiling colorchoice v1.0.5 - Compiling anstyle v1.0.14 - Compiling anstyle-query v1.1.5 - Compiling anstream v1.0.0 - Compiling logos-derive v0.16.1 - Compiling strsim v0.11.1 - Compiling logos v0.16.1 - Compiling clap_lex v1.1.0 - Compiling techscript_lexer v2.0.0 (/app/compiler/lexer) - Compiling clap_builder v4.6.7 - Compiling clap_derive v4.6.7 - Compiling bincode v3.0.0 -error: https://xkcd.com/2347/ - --> /home/jules/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bincode-3.0.0/src/lib.rs:1:1 - | -1 | compile_error!("https://xkcd.com/2347/"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: could not compile `bincode` (lib) due to 1 previous error -warning: build failed, waiting for other jobs to finish...