Expand description
euv CLI
The official CLI tool for the euv UI framework, providing run/build/fmt modes with hot reload and wasm-pack integration.
Structs§
- Cli
- euv CLI for real-time WASM compilation and hot-reload development server.
- FmtArgs
- Arguments for the
fmtsubcommand. - Formatter
- Configuration for formatting.
- From
Utf8 Error - A possible error value when converting a
Stringfrom a UTF-8 byte vector. - HmrState
- A serializable bag of preserved state entries.
- IoError
- The error type for I/O operations of the
Read,Write,Seek, and associated traits. - Logger
- Custom logger implementation for the euv CLI.
- Mode
Args - euv-specific arguments combined with wasm-pack passthrough.
- OsStr
- Borrowed reference to an OS string (see
OsString).
Enums§
- Action
- The action to perform.
- Build
Mode - The build mode for wasm-pack compilation.
- EuvError
- The error type for the euv CLI application.
- FmtMode
- The formatting mode for the CLI.
- Mode
- The action to perform.
- Reload
Event - Represents the type of reload event sent to connected clients.
Constants§
- ACTION_
BUILD - The
buildaction name used in banner display. - ACTION_
RUN - The
runaction name used in banner display. - ARROW_
FAT - The Rust fat arrow operator string.
- BLOCK_
COMMENT_ START - The block comment start delimiter.
- CARGO_
TOML_ FILE_ NAME - The name of the Cargo manifest file.
- CHAR_
ASTERISK - The asterisk character, used in block comment end detection.
- CHAR_
BRACE_ LEFT - The left brace character used to delimit code blocks and macro bodies.
- CHAR_
BRACE_ RIGHT - The right brace character used to delimit code blocks and macro bodies.
- CHAR_
CARRIAGE_ RETURN - The carriage return character.
- CHAR_
COLON - The colon character, used in attribute separator formatting.
- CHAR_
COMMA - The comma character.
- CHAR_
DOUBLE_ QUOTE - The double quote character used to delimit string literals.
- CHAR_
EQUALS - The equals sign character, used in fat arrow detection.
- CHAR_
GREATER_ THAN - The greater-than character, used in fat arrow detection.
- CHAR_
HASH - The hash character, used in raw identifier prefix detection.
- CHAR_
HYPHEN - The hyphen character, used in CSS selector identifier detection.
- CHAR_
LEFT_ PAREN - The left parenthesis character, used in CSS functional pseudo-class detection.
- CHAR_
LETTER_ A - The letter
a, used in keyword detection. - CHAR_
LETTER_ C - The letter
c, used in keyword detection. - CHAR_
LETTER_ E - The letter
e, used in keyword detection. - CHAR_
LETTER_ F - The letter
f, used in keyword detection. - CHAR_
LETTER_ H - The letter
h, used in keyword detection. - CHAR_
LETTER_ I - The letter
i, used in keyword detection. - CHAR_
LETTER_ L - The letter
l, used in keyword detection. - CHAR_
LETTER_ M - The letter
m, used in keyword detection. - CHAR_
LETTER_ N - The letter
n, used in keyword detection. - CHAR_
LETTER_ O - The letter
o, used in keyword detection. - CHAR_
LETTER_ R - The letter
r, used in keyword detection. - CHAR_
LETTER_ S - The letter
s, used in keyword detection. - CHAR_
LETTER_ T - The letter
t, used in keyword detection. - CHAR_
MACRO_ BANG - The exclamation mark character used to identify macro invocations.
- CHAR_
NEWLINE - The newline character.
- CHAR_
RIGHT_ PAREN - The right parenthesis character, used in CSS functional pseudo-class detection.
- CHAR_
SEMICOLON - The semicolon character.
- CHAR_
SINGLE_ QUOTE - The single quote character used to delimit character and string literals.
- CHAR_
SLASH_ BACK - The backslash character used as escape prefix in string literals.
- CHAR_
SLASH_ FORWARD - The forward slash character used in comment and path detection.
- CHAR_
SPACE - The space character.
- CHAR_
TAB - The tab character.
- CHAR_
UNDERSCORE - The underscore character, part of Rust identifiers.
- CRATE_
PATH_ ARG - The euv-specific argument for specifying the crate path.
- CRATE_
PATH_ ARG_ SHORT - The short form of the crate-path argument.
- DEV_
FLAG - The wasm-pack flag for development builds.
- DOUBLE_
DASH - The double-dash separator used to distinguish euv args from wasm-pack args.
- ERROR_
SERVER_ NOT_ READY - The error message returned when the server is not yet ready.
- EUV_
ARGS - The euv-specific argument names that should not be forwarded to wasm-pack.
- EUV_
MACRO_ NAMES - The euv macro names that should be formatted.
- EUV_
NO_ INLINE_ BRIDGE_ ENV - Environment variable to disable JS bridge inlining and fall back to the
classic
<script type="module">import init, { main } from '__IMPORT_PATH__'bootstrap. Set to any non-empty value to opt out (e.g. when the wasm-pack output structure changes and the inline pipeline can’t recover). - GITIGNORE_
FILE_ NAME - The name of the gitignore file.
- HTTP_
SCHEME - The HTTP scheme prefix.
- IMPORT_
PATH_ PLACEHOLDER - Placeholder token used in HTML templates for the JS import path.
- INDEX_
HTML_ ARG - The euv-specific argument for specifying a custom index.html template.
- INDEX_
HTML_ DEV - The
index.htmltemplate for the development profile. - INDEX_
HTML_ FILE_ NAME - The index HTML file name.
- INDEX_
HTML_ RELEASE - The
index.htmltemplate for the release profile. - INLINE_
JS_ PLACEHOLDER - Placeholder token used in HTML templates for the inlined wasm-bindgen JS bridge.
- JS_
EXTENSION - The JavaScript file extension.
- KEYWORD_
ELSE - The Rust
elsekeyword string. - KEYWORD_
FOR - The Rust
forkeyword string. - KEYWORD_
IF - The Rust
ifkeyword string. - KEYWORD_
IN - The Rust
inkeyword string. - KEYWORD_
MATCH - The Rust
matchkeyword string. - LOG_
COLON - Colon separator used between file path and line number.
- LOG_
SPACE - Single space separator used in log output formatting.
- MACRO_
NAME_ CLASS - The euv macro name for
class!. - MACRO_
NAME_ HTML - The euv macro name for
html!. - MACRO_
NAME_ VARS - The euv macro name for
vars!. - MACRO_
NAME_ WATCH - The euv macro name for
watch!. - NODE_
MODULES_ DIR_ NAME - The directory name to skip when scanning for Rust source files (Node.js dependencies).
- NO_
GITIGNORE_ ARG - The euv-specific argument for removing the .gitignore file from the output directory.
- OUT_
DIR_ ARG - The wasm-pack argument for specifying the output directory.
- OUT_
NAME_ ARG - The wasm-pack argument for specifying the output name.
- PARENT_
DIR - The parent directory indicator used in relative path computation.
- PATH_
SEPARATOR - The path separator used for joining path components.
- PKG_
DIR_ NAME - The default output subdirectory name for wasm-pack artifacts.
- PORT_
ARG - The euv-specific argument for specifying the server port.
- PORT_
ARG_ SHORT - The short form of the port argument.
- PROFILING_
FLAG - The wasm-pack flag for profiling builds.
- RAW_
IDENT_ PREFIX - The raw identifier prefix string.
- RELATIVE_
PATH_ PREFIX - The relative path prefix used for import path construction.
- RELEASE_
FLAG - The wasm-pack flag indicating a release build.
- RELOAD_
ROUTE - The URL path for the reload endpoint.
- RELOAD_
ROUTE_ PLACEHOLDER - Placeholder token used in HTML templates for the reload endpoint URL.
- RS_
EXTENSION - The Rust source file extension.
- RUST_
MIN_ STACK_ ENV - The environment variable name for setting the minimum stack size of rustc threads.
- RUST_
MIN_ STACK_ VALUE - The minimum stack size in bytes for rustc threads (16 MiB).
- SRC_
DIR_ NAME - The source directory name within a Cargo project.
- STR_
HYPHEN - The hyphen character used when normalizing crate names to wasm-pack’s underscore output convention.
- STR_
SLASH_ FORWARD - The forward slash string used in path normalization.
- STR_
UNDERSCORE - The underscore character used when normalizing crate names to wasm-pack’s output convention.
- TARGET_
ARG - The wasm-pack argument for specifying the target.
- TARGET_
DIR_ NAME - The directory name to skip when scanning for Rust source files (Rust build output).
- TARGET_
WEB - The default wasm-pack target for browser usage.
- WASM_
PACK_ BUILD_ SUBCOMMAND - The wasm-pack subcommand for building.
- WASM_
PACK_ COMMAND - The CLI command name for wasm-pack.
- WINDOWS_
UNC_ PREFIX - The Windows UNC path prefix.
- WWW_
DIR_ ARG - The euv-specific argument for specifying the www directory.
Statics§
- LOGGER
- Global static Logger instance.
Traits§
- Display
- Format trait for an empty format,
{}. - Error
Erroris a trait representing the basic expectations for error values, i.e., values of typeEinResult<T, E>.
Functions§
- build_
mode - Executes the build-only pipeline.
- build_
mode_ to_ flag - Converts a
BuildModeto the corresponding wasm-pack flag string. - build_
wasm - Runs wasm-pack build for the target crate.
- clean_
out_ dir - Cleans the output directory before a fresh build.
- extract_
exported_ function_ names - Scans a snippet module’s source for
export function NAME(declarations and returns the list of exported names. The IIFE relies on function declarations being hoisted, so the names referenced in the generated namespace object always resolve to the same hoisted bindings that wasm-bindgen’s__wbg_get_importsexpects. - extract_
import_ spec - extract_
namespace_ alias - filter_
euv_ args - Filters out euv-specific arguments from the wasm-pack arguments.
- fmt_
mode - Executes the format command.
- format_
dir - Formats all Rust source files in the given directory that contain euv macros.
- format_
euv_ macros - Finds and reformats all euv macro invocations in the source text.
- format_
macro_ body - Formats the body of a euv macro invocation.
- has_
build_ mode_ flag - Checks whether
wasm_pack_argsalready contains a build mode flag. - is_
namespace_ import - print_
banner - Prints the startup banner and command information.
- reconcile_
args - Reconciles euv-specific arguments that may have been collected into
wasm_pack_args(e.g. when placed after--) back into the correspondingModeArgsfields. - resolve_
build_ mode - Resolves the build mode from CLI arguments.
- resolve_
file_ in_ base - Resolves a file path within a base directory with path-traversal protection.
- resolve_
import_ path - Resolves the JS import path for HTML generation.
- resolve_
out_ dir - Resolves the output directory for wasm-pack artifacts.
- resolve_
out_ name - Resolves the output JS filename for HTML generation.
- resolve_
pkg_ dir - Resolves the pkg directory for serving WASM artifacts.
- resolve_
serving_ root - Resolves the serving root directory for the development server.
- resolve_
serving_ route_ prefix - Resolves the serving route prefix relative to the crate path.
- resolve_
www_ dir - Resolves the effective www directory, handling wasm-pack nested output.
- run_
build_ only_ pipeline - Executes a build-only pipeline: formats euv macros, cleans output directory, builds WASM, and generates HTML.
- run_
build_ pipeline - Executes a full build pipeline: euv fmt, build wasm, generate HTML. After the serial pipeline completes, hyperlane-cli fmt is spawned in the background so it does not block the caller. Notifies the reload channel on build success or failure.
- run_
hyperlane_ fmt - Executes
hyperlane-cli fmtvia the library API to format Rust source files. - run_
mode - Executes the run mode (build + dev server + hot reload).