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 bundle;
9mod error;
10mod fmt;
11mod hmr;
12mod logger;
13mod mode;
14mod server;
15
16#[cfg(test)]
17#[path = "../tests/mod.rs"]
18mod tests;
19
20pub use std::{
21    env::{current_dir, var},
22    // hyperlane exports an async ; the std one is synchronous and
23    // returns its Result directly, so the bare name would silently change which
24    // function this crate calls.
25    error::Error,
26    ffi::OsStr,
27    fmt::{Display, Formatter},
28    fs::{canonicalize as sync_canonicalize, read_to_string as sync_read_to_string},
29    iter::once,
30    mem::take,
31    string::FromUtf8Error,
32};
33
34pub use {build::*, bundle::*, error::*, fmt::*, hmr::*, logger::*, mode::*, server::*};
35
36use {
37    clap::{Parser, ValueEnum},
38    color_output::*,
39    hyperlane::*,
40    ignore::gitignore::{Gitignore, GitignoreBuilder},
41    log::SetLoggerError,
42    lombok_macros::*,
43    notify::{Config, Event, RecommendedWatcher, RecursiveMode, Watcher},
44    qrcode::{QrCode, render::unicode::Dense1x2},
45    serde::Serialize,
46    std::{
47        collections::HashMap,
48        ffi,
49        fmt::Arguments,
50        fs::FileType,
51        io,
52        net::{IpAddr, Ipv4Addr},
53        path::{Component, Path, PathBuf},
54        process::{ExitStatus, Output, Stdio},
55        slice::Iter,
56        sync::{Arc, OnceLock},
57        time::Duration,
58    },
59    tokio::{
60        fs::{
61            DirEntry, ReadDir, canonicalize, create_dir_all, metadata, read, read_dir,
62            read_to_string, remove_dir, remove_dir_all, remove_file, write,
63        },
64        process::Command,
65        spawn,
66        sync::{
67            RwLock, RwLockWriteGuard, broadcast,
68            mpsc::{self, Receiver, Sender, channel},
69        },
70        time::{Interval, interval, sleep},
71    },
72};