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        io,
46        net::{IpAddr, Ipv4Addr},
47        path::{Component, Path, PathBuf},
48        process::{Output, Stdio},
49        slice::Iter,
50        sync::{Arc, OnceLock},
51        time::Duration,
52    },
53    tokio::{
54        fs::{
55            ReadDir, canonicalize, create_dir_all, metadata, read, read_dir, read_to_string,
56            remove_dir_all, remove_file, write,
57        },
58        process::Command,
59        spawn,
60        sync::{
61            RwLock, RwLockWriteGuard, broadcast,
62            mpsc::{Receiver, Sender, channel},
63        },
64        time::{Interval, interval, sleep},
65    },
66};