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§

BuildArgs
The native build settings a command line carries.
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.
NativePlan
The resolved plan for one native build invocation.
NativeTarget
One native deliverable in a resolved build plan.
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.
HostOs
The host operating systems the native builders support.
Mode
The action to perform.
NativePlatform
A native platform the euv CLI can build a client for.
NativeTask
The kind of work a native platform needs from the native builders.
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_all_mode
Executes the build pipeline that produces the web output and every requested native client.
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_arch
Returns the host architecture this build runs on.
current_dir
Returns the current working directory as a PathBuf.
current_host
Returns the host operating system this build runs on.
describe_platforms
Renders a platform list as a comma separated list of names.
describe_requirements
Renders the host requirement of every platform in a list.
dispatch_build_mode
Dispatches the build mode to the web-only pipeline or the native one.
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.
host_platforms
Returns every platform the given host can build.
host_supports
Reports whether a host can build a platform.
native_task
Returns the kind of builder a platform needs.
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.
print_native_plan
Prints the resolved plan for a native build.
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.
reject_native_flags_in_run
Rejects the native-only flags when they reach the run mode.
require_native_project
Rejects a native client project directory that is not there.
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_native_plan
Resolves the native build plan for the requested platforms.
resolve_native_project
Resolves the native client project directory.
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_requested_platforms
Resolves the requested platforms from the command line.
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_web_dist
Resolves the directory the web build output is published into.
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.