euv-cli 0.51.0

Cross-platform CLI tool for the euv native UI framework supporting run, build, check, fmt, doctor, new, and Hyperlane SSE dynamic updates across all supported platforms.
Documentation
//! euv-cli
//!
//! Cross-platform command-line toolchain for euv providing native run, build,
//! hot-reload dev server, Hyperlane HTTP/SSE dynamic update server, Markdown
//! documentation site builder, cross-target check, formatting, environment
//! diagnostics, project scaffolding, shell completions, and live/artifact inspection.

mod args;
mod blender;
mod builder;
mod command;
mod config;
mod dx;
mod fmt;
mod hot;
mod platform;
mod update_server;

#[cfg(test)]
#[path = "../tests/mod.rs"]
mod tests;

pub use {
    args::*, blender::*, builder::*, command::*, config::*, dx::*, fmt::*, hot::*, platform::*,
    update_server::*,
};

#[cfg(feature = "update-server")]
use std::collections::HashMap;
#[cfg(unix)]
use std::fs::Permissions;
#[cfg(feature = "update-server")]
use std::net::AddrParseError;
#[cfg(unix)]
use std::os::unix::fs::PermissionsExt;
#[cfg(feature = "update-server")]
use std::sync::{OnceLock, RwLock, RwLockReadGuard};
use std::{
    borrow::Cow,
    cmp,
    collections::{
        BTreeMap, BTreeSet, btree_map,
        hash_map::{DefaultHasher, RandomState},
    },
    env::{self, VarError, consts},
    ffi::{OsStr, OsString},
    fs::{self, DirEntry, File, Metadata, OpenOptions},
    hash::{BuildHasher, Hasher},
    io::{self, BufRead, BufReader, Error, ErrorKind, Read, Write},
    iter::Peekable,
    mem::take,
    net::{IpAddr, SocketAddr, TcpListener, TcpStream, UdpSocket},
    num::{NonZeroUsize, TryFromIntError},
    path::{Component, Path, PathBuf, StripPrefixError},
    process::{self, Child, Command, ExitStatus, Output, Stdio},
    str::{Chars, SplitWhitespace, Utf8Error, from_utf8},
    string::FromUtf8Error,
    sync::{
        Arc, Mutex, MutexGuard,
        atomic::{AtomicBool, AtomicU64, Ordering},
    },
    thread::{self, JoinHandle, Scope, ScopedJoinHandle},
    time::{self, Duration, Instant, SystemTime, UNIX_EPOCH},
};

use {
    clap::{ArgAction, Args, Parser, Subcommand, ValueEnum},
    crate_cli::{UnifiedFmtReport, execute_unified_fmt, format_workspace_text_files},
    euv_core::{
        ArtifactKind, BLEND_MAGIC, BakedAssetBundle3D, BlendCompression, BlendInspectionReport,
        BlobArtifact, ClientNegotiation, CollectionEntry3D, DEFAULT_MAX_ARTIFACT_BYTES,
        DYNAMIC_EVENT_SCHEMA_V1, DYNAMIC_HOST_ABI_V1, DYNAMIC_MANIFEST_SCHEMA_V1,
        DYNAMIC_PROTOCOL_VERSION_V1, DeliveryChannelMode, DirectoryGltfResolver, DynamicNodeSpec,
        DynamicReleaseError, DynamicStyleSpec, ENV_EUV_UPDATE_CACHE_DIR, ENV_EUV_UPDATE_CHANNEL,
        ENV_EUV_UPDATE_URL, EUV3D_DEFAULT_LOD_LEVELS, EUV3D_MAGIC, EUV3D_SECTION_ALIGNMENT,
        Euv3dBakeConfig, Euv3dHeader, Euv3dPackage, Euv3dPackageView, Euv3dSectionEntry,
        Euv3dSectionKind, GraphicsBackend, ImportedAnimationClip3D, ImportedModel3D,
        ImportedScene3D, Mesh3D, MeshLodChain, ModelImporter3D, PbrMaterial, PlatformCapabilities,
        PlatformKind, PrincipledMaterial3D, ReleaseActivatedEvent, ReleaseManifest, RenderConfig,
        RenderMode, Renderer, RouteManifest, SSE_EVENT_RELEASE_ACTIVATED, SceneGraph3D,
        SceneNode3D, WASM_EXPORT_ABI, WASM_EXPORT_RENDER, WasmDynamicError, WasmExecutionOutput,
        WasmParsedModule, WasmSandboxConfig, build_partial_widget_wasm, compute_wasm_checksum,
        compute_wasm_signature, constant_time_eq, default_track_for, execute_wasm_export,
        inspect_blend_bytes, is_valid_sha256_hex, parse_gltf_or_glb_bytes, parse_wasm_binary,
        sha256_bytes, sha256_hex,
    },
    euv_docs::{
        DocSiteConfig, DocsBuildOptions, GeneratedSiteReport, build_docs_bundle,
        build_multilocale_wasm_site, load_site_config,
    },
    lombok_macros::{Data, Getter, New},
    serde::{Deserialize, Serialize},
    serde_json::{self, Map, Value, from_str, to_string, to_string_pretty},
    tokio::runtime::{Builder, Runtime},
};
#[cfg(feature = "update-server")]
use {
    hyperlane::{
        CACHE_CONTROL, CONTENT_TYPE, Context, Method, Response, ResponseData, ResponseError,
        Server, ServerConfig, ServerControlHook, ServerHook, Status, Stream,
        tokio::{
            runtime, select, task,
            time::{Interval, MissedTickBehavior, interval},
        },
    },
    hyperlane_plugin_sse::{SseConfig, SseError, SseEvent, SseHub, SseStream, SseSubscription},
    lombok_macros::CustomDebug,
    serde_json::to_vec,
};