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.
Formatter
Configuration for formatting.
FromUtf8Error
A possible error value when converting a String from a UTF-8 byte vector.
HmrState
A serializable bag of preserved state entries.
ImportClause
One static import clause of the wasm-bindgen bridge, parsed into the bindings a self-contained bootstrap can reproduce.
Logger
Custom logger implementation for the euv CLI.
ModeArgs
euv-specific arguments combined with wasm-pack passthrough.
OsStr
Borrowed reference to an OS string (see OsString).

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.

Traits§

Display
Format trait for an empty format, {}.
Error
Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.

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.
current_dir
Returns the current working directory as a PathBuf.
extract_exported_names
Scans a snippet module for every name it exports, so a namespace import can be rebuilt as a plain object. export function, export async function, export class and export const|let|var all count.
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_args already contains a build mode flag.
once
Creates an iterator that yields an element exactly once.
parse_import_clause
Parses one import clause, rejecting shapes the inliner cannot model.
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
Formats euv macros, builds WASM, writes HTML, then removes generated glue.
run_build_pipeline
Executes a full build pipeline: euv fmt, build wasm, generate HTML, then remove the JavaScript that was inlined into it.
run_mode
Executes the run mode (build + dev server + hot reload).
sync_canonicalize
Returns the canonical, absolute form of a path with all intermediate components normalized and symbolic links resolved.
sync_read_to_string
Reads the entire contents of a file into a string.
take
Replaces dest with the default value of T, returning the previous dest value.
var
Fetches the environment variable key from the current process.