Skip to main content

euv_cli/
lib.rs

1//! euv-cli
2//!
3//! The official CLI tool for the euv UI framework,
4//! providing run/build/fmt modes with hot reload and
5//! wasm-pack integration.
6
7mod build;
8mod error;
9mod fmt;
10mod hmr;
11mod logger;
12mod mode;
13mod server;
14
15pub use std::{
16    env::{current_dir, var},
17    // hyperlane exports an async ; the std one is synchronous and
18    // returns its Result directly, so the bare name would silently change which
19    // function this crate calls.
20    error::Error,
21    ffi::OsStr,
22    fmt::{Display, Formatter},
23    fs::{canonicalize as sync_canonicalize, read_to_string as sync_read_to_string},
24    iter::once,
25    mem::take,
26    string::FromUtf8Error,
27};
28pub use {build::*, error::*, fmt::*, hmr::*, logger::*, mode::*, server::*};
29
30use {
31    clap::Parser,
32    color_output::*,
33    hyperlane::*,
34    ignore::gitignore::{Gitignore, GitignoreBuilder},
35    log::SetLoggerError,
36    lombok_macros::*,
37    notify::{Config, Event, RecommendedWatcher, RecursiveMode, Watcher},
38    qrcode::{QrCode, render::unicode::Dense1x2},
39    serde::Serialize,
40    std::{
41        collections::HashMap,
42        ffi,
43        fmt::Arguments,
44        io,
45        net::{IpAddr, Ipv4Addr},
46        path::{Component, Path, PathBuf},
47        process::{Output, Stdio},
48        slice::Iter,
49        sync::{Arc, OnceLock},
50        time::Duration,
51    },
52    tokio::{
53        fs::{
54            ReadDir, canonicalize, create_dir_all, metadata, read, read_dir, read_to_string,
55            remove_dir_all, remove_file, write,
56        },
57        process::Command,
58        spawn,
59        sync::{
60            RwLock, RwLockWriteGuard, broadcast,
61            mpsc::{Receiver, Sender, channel},
62        },
63        time::{Interval, interval, sleep},
64    },
65};