pub struct EnvironmentConfig {Show 39 fields
pub custom_hooks: HashMap<String, HookConfig>,
pub module_type_provider: Option<IndexMap<String, TypeConfig>>,
pub custom_macros: Option<Vec<String>>,
pub enable_reset_cache_on_source_file_changes: Option<bool>,
pub enable_preserve_existing_memoization_guarantees: bool,
pub validate_preserve_existing_memoization_guarantees: bool,
pub validate_exhaustive_memoization_dependencies: bool,
pub validate_exhaustive_effect_dependencies: ExhaustiveEffectDepsMode,
pub enable_optional_dependencies: bool,
pub enable_name_anonymous_functions: bool,
pub validate_hooks_usage: bool,
pub validate_ref_access_during_render: bool,
pub validate_no_set_state_in_render: bool,
pub enable_use_keyed_state: bool,
pub validate_no_set_state_in_effects: bool,
pub validate_no_derived_computations_in_effects: bool,
pub validate_no_derived_computations_in_effects_exp: bool,
pub validate_no_jsx_in_try_statements: bool,
pub validate_static_components: bool,
pub validate_no_capitalized_calls: Option<Vec<String>>,
pub validate_blocklisted_imports: Option<Vec<String>>,
pub validate_source_locations: bool,
pub validate_no_impure_functions_in_render: bool,
pub validate_no_freezing_known_mutable_functions: bool,
pub enable_assume_hooks_follow_rules_of_react: bool,
pub enable_transitively_freeze_function_expressions: bool,
pub enable_emit_hook_guards: Option<ExternalFunctionConfig>,
pub enable_emit_instrument_forget: Option<InstrumentationConfig>,
pub enable_function_outlining: bool,
pub enable_jsx_outlining: bool,
pub assert_valid_mutable_ranges: bool,
pub throw_unknown_exception_testonly: bool,
pub enable_custom_type_definition_for_reanimated: bool,
pub enable_treat_ref_like_identifiers_as_refs: bool,
pub enable_treat_set_identifiers_as_state_setters: bool,
pub validate_no_void_use_memo: bool,
pub enable_allow_set_state_from_refs_in_effects: bool,
pub enable_verbose_no_set_state_in_effect: bool,
pub enable_forest: bool,
}Expand description
Compiler environment configuration. Contains feature flags and settings.
Fields that would require passing JS functions across the JS/Rust boundary
are omitted with TODO comments. The Rust port uses hardcoded defaults for
these (e.g., defaultModuleTypeProvider).
Fields§
§custom_hooks: HashMap<String, HookConfig>Custom hook type definitions, keyed by hook name.
module_type_provider: Option<IndexMap<String, TypeConfig>>Pre-resolved module type provider results. Map from module name to TypeConfig, computed by the JS shim.
custom_macros: Option<Vec<String>>Custom macro-like function names that should have their operands memoized in the same scope (similar to fbt).
enable_reset_cache_on_source_file_changes: Option<bool>If true, emit code to reset the memo cache on source file changes (HMR/fast refresh). If null (None), HMR detection is conditionally enabled based on NODE_ENV/DEV.
enable_preserve_existing_memoization_guarantees: bool§validate_preserve_existing_memoization_guarantees: bool§validate_exhaustive_memoization_dependencies: bool§validate_exhaustive_effect_dependencies: ExhaustiveEffectDepsMode§enable_optional_dependencies: bool§enable_name_anonymous_functions: bool§validate_hooks_usage: bool§validate_ref_access_during_render: bool§validate_no_set_state_in_render: bool§enable_use_keyed_state: bool§validate_no_set_state_in_effects: bool§validate_no_derived_computations_in_effects: bool§validate_no_derived_computations_in_effects_exp: bool§validate_no_jsx_in_try_statements: bool§validate_static_components: bool§validate_no_capitalized_calls: Option<Vec<String>>§validate_blocklisted_imports: Option<Vec<String>>§validate_source_locations: bool§validate_no_impure_functions_in_render: bool§validate_no_freezing_known_mutable_functions: bool§enable_assume_hooks_follow_rules_of_react: bool§enable_transitively_freeze_function_expressions: bool§enable_emit_hook_guards: Option<ExternalFunctionConfig>Hook guard configuration. When set, wraps hook calls with dispatcher guard calls.
enable_emit_instrument_forget: Option<InstrumentationConfig>Instrumentation configuration. When set, emits calls to instrument functions.
enable_function_outlining: bool§enable_jsx_outlining: bool§assert_valid_mutable_ranges: bool§throw_unknown_exception_testonly: bool§enable_custom_type_definition_for_reanimated: bool§enable_treat_ref_like_identifiers_as_refs: bool§enable_treat_set_identifiers_as_state_setters: bool§validate_no_void_use_memo: bool§enable_allow_set_state_from_refs_in_effects: bool§enable_verbose_no_set_state_in_effect: bool§enable_forest: boolTrait Implementations§
Source§impl Clone for EnvironmentConfig
impl Clone for EnvironmentConfig
Source§fn clone(&self) -> EnvironmentConfig
fn clone(&self) -> EnvironmentConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more