Struct Opts

Source
pub struct Opts {
Show 20 fields pub subcmd: Subcommand, pub cargo_engine_path: String, pub cargo_browser_path: String, pub wasm_bindgen_path: Option<String>, pub wasm_opt_path: Option<String>, pub rustup_path: String, pub wasm_release_rustflags: String, pub cargo_engine_args: String, pub cargo_browser_args: String, pub wasm_bindgen_args: String, pub wasm_opt_args: String, pub git_path: String, pub reload_server_host: String, pub reload_server_port: u16, pub sequential: bool, pub no_browser_reload: bool, pub wasm_bindgen_version: Option<String>, pub wasm_opt_version: Option<String>, pub no_system_tools_cache: bool, pub verbose: bool,
}
Expand description

The command-line interface for Perseus, a super-fast WebAssembly frontend development framework!

Fields§

§subcmd: Subcommand§cargo_engine_path: String

The path to cargo when used for engine builds

§cargo_browser_path: String

The path to cargo when used for browser builds

§wasm_bindgen_path: Option<String>

A path to wasm-bindgen, if you want to use a local installation (note that the CLI will install it locally for you by default)

§wasm_opt_path: Option<String>

A path to wasm-opt, if you want to use a local installation (note that the CLI will install it locally for you by default)

§rustup_path: String

The path to rustup

§wasm_release_rustflags: String

The value of RUSTFLAGS when building for Wasm in release mode (this will not impact internal target-gating)

§cargo_engine_args: String

Any arguments to cargo when building for the engine-side

§cargo_browser_args: String

Any arguments to cargo when building for the browser-side

§wasm_bindgen_args: String

Any arguments to wasm-bindgen

§wasm_opt_args: String

Any arguments to wasm-opt (only run in release builds)

§git_path: String

The path to git (for downloading custom templates for perseus new)

§reload_server_host: String

The host for the reload server (you should almost never change this)

§reload_server_port: u16

The port for the reload server (you should almost never change this)

§sequential: bool

If this is set, commands will be run sequentially rather than in parallel (slows down operations, but reduces memory usage)

§no_browser_reload: bool

Disable automatic browser reloading

§wasm_bindgen_version: Option<String>

A custom version of wasm-bindgen to use (defaults to the latest installed version, and after that the latest available from GitHub; update to latest can be forced with latest)

§wasm_opt_version: Option<String>

A custom version of wasm-opt to use (defaults to the latest installed version, and after that the latest available from GitHub; update to latest can be forced with latest)

§no_system_tools_cache: bool

Disables the system-wide tools cache in ~/.cargo/perseus_tools/ (you should set this for CI)

§verbose: bool

Shows the logs from building and serving your app no matter what (the default is to only show them on a compilation/build failure); this is intended mainly for end-to-end debugging, although the snoop commands are more useful for targeted debugging

Trait Implementations§

Source§

impl Args for Opts

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Clone for Opts

Source§

fn clone(&self) -> Opts

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CommandFactory for Opts

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl FromArgMatches for Opts

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Parser for Opts

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

§

impl Freeze for Opts

§

impl RefUnwindSafe for Opts

§

impl Send for Opts

§

impl Sync for Opts

§

impl Unpin for Opts

§

impl UnwindSafe for Opts

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T