Skip to main content

Crate euv_cli

Crate euv_cli 

Source
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 fmt subcommand.
Logger
Custom logger implementation for the euv CLI.
ModeArgs
euv-specific arguments combined with wasm-pack passthrough.

Enums§

Action
The action to perform.
BuildMode
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.
ReloadEvent
Represents the type of reload event sent to connected clients.

Constants§

ACTION_BUILD
The build action name used in banner display.
ACTION_RUN
The run action 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.
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.html template for the development profile.
INDEX_HTML_FILE_NAME
The index HTML file name.
INDEX_HTML_RELEASE
The index.html template for the release profile.
JS_EXTENSION
The JavaScript file extension.
KEYWORD_ELSE
The Rust else keyword string.
KEYWORD_FOR
The Rust for keyword string.
KEYWORD_IF
The Rust if keyword string.
KEYWORD_IN
The Rust in keyword string.
KEYWORD_MATCH
The Rust match keyword 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_SLASH_FORWARD
The forward slash string used in path normalization.
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.

Functions§

build_mode
Executes the build-only pipeline.
build_mode_to_flag
Converts a BuildMode to 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.
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
has_build_mode_flag
Checks whether wasm_pack_args already contains a build mode flag.
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 corresponding ModeArgs fields.
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 fmt via the library API to format Rust source files.
run_mode
Executes the run mode (build + dev server + hot reload).