Struct ScryptoCompilerInputParams

Source
pub struct ScryptoCompilerInputParams {
Show 13 fields pub manifest_path: Option<PathBuf>, pub target_directory: Option<PathBuf>, pub profile: Profile, pub environment_variables: IndexMap<String, EnvironmentVariableAction>, pub features: IndexSet<String>, pub no_default_features: bool, pub all_features: bool, pub package: IndexSet<String>, pub locked: bool, pub ignore_locked_env_var: bool, pub custom_options: IndexSet<String>, pub wasm_optimization: Option<OptimizationOptions>, pub verbose: bool,
}

Fields§

§manifest_path: Option<PathBuf>

Path to Cargo.toml file, if not specified current directory will be used.

§target_directory: Option<PathBuf>

Path to directory where compilation artifacts are stored, if not specified default location will by used.

§profile: Profile

Compilation profile. If not specified default profile: Release will be used.

§environment_variables: IndexMap<String, EnvironmentVariableAction>

List of environment variables to set or unset during compilation. By default it includes compilation flags for C libraries to configure WASM with the same features as Radix Engine. TARGET_CFLAGS=“-mcpu=mvp -mmutable-globals -msign-ext”

§features: IndexSet<String>

List of features, used for ‘cargo build –features’. Optional field.

§no_default_features: bool

If set to true then ‘–no-default-features’ option is passed to ‘cargo build’. The default value is false.

§all_features: bool

If set to true then ‘–all-features’ option is passed to ‘cargo build’. The default value is false.

§package: IndexSet<String>

List of packages to compile, used for ‘cargo build –package’. Optional field.

§locked: bool

If set to true then ‘–locked’ option is passed to ‘cargo build’, which enforces using the Cargo.lock file without changes. The default value is false.

§ignore_locked_env_var: bool

If set, the SCRYPTO_CARGO_LOCKED environment variable is ignored. This is useful for unit tests in this repo, which need to run successfully independent of this setting. Defaults to false.

§custom_options: IndexSet<String>

List of custom options, passed as ‘cargo build’ arguments without any modifications. Optional field. Add each option as separate entry (for instance: ‘-j 1’ must be added as two entires: ‘-j’ and ‘1’ one by one).

§wasm_optimization: Option<OptimizationOptions>

If specified optimizes the built wasm using Binaryen’s wasm-opt tool. Default configuration is equivalent to running the following commands in the CLI: wasm-opt -0z –strip-debug –strip-dwarf –strip-producers –dce $some_path $some_path

§verbose: bool

If set to true then compiler informs about the compilation progress

Implementations§

Trait Implementations§

Source§

impl Clone for ScryptoCompilerInputParams

Source§

fn clone(&self) -> ScryptoCompilerInputParams

Returns a duplicate 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 Debug for ScryptoCompilerInputParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ScryptoCompilerInputParams

Source§

fn default() -> Self

Definition of default ScryptoCompiler configuration.

Auto Trait Implementations§

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<U> As for U

Source§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. 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, U> ContextualTryInto<U> for T
where U: ContextualTryFrom<T>,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<X, Y> LabelledResolve<Y> for X
where Y: LabelledResolveFrom<X>,

Source§

fn labelled_resolve( self, resolver: &impl LabelResolver<<Y as LabelledResolvable>::ResolverOutput>, ) -> Y

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<X, Y> Resolve<Y> for X
where Y: ResolveFrom<X>,

Source§

fn resolve(self) -> Y

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.