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};
28
29pub use {build::*, error::*, fmt::*, hmr::*, logger::*, mode::*, server::*};
30
31use {
32    clap::Parser,
33    color_output::*,
34    hyperlane::*,
35    ignore::gitignore::{Gitignore, GitignoreBuilder},
36    log::SetLoggerError,
37    lombok_macros::*,
38    notify::{Config, Event, RecommendedWatcher, RecursiveMode, Watcher},
39    qrcode::{QrCode, render::unicode::Dense1x2},
40    serde::Serialize,
41    std::{
42        collections::HashMap,
43        ffi,
44        fmt::Arguments,
45        fs::FileType,
46        io,
47        net::{IpAddr, Ipv4Addr},
48        path::{Component, Path, PathBuf},
49        process::{Output, Stdio},
50        slice::Iter,
51        sync::{Arc, OnceLock},
52        time::Duration,
53    },
54    tokio::{
55        fs::{
56            DirEntry, ReadDir, canonicalize, create_dir_all, metadata, read, read_dir,
57            read_to_string, remove_dir, remove_dir_all, remove_file, write,
58        },
59        process::Command,
60        spawn,
61        sync::{
62            RwLock, RwLockWriteGuard, broadcast,
63            mpsc::{Receiver, Sender, channel},
64        },
65        time::{Interval, interval, sleep},
66    },
67};