{"record":{"id":"6c8eda4e373b26d6","repo":"FyroxEngine/Fyrox","slug":"unknown-target-platform","errorCode":null,"errorMessage":"unknown target platform {}!","messagePattern":"unknown target platform (.+?)!","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"fyrox-build-tools/src/export/mod.rs","lineNumber":341,"sourceCode":"    /// version. For example, native game scenes and UIs will be converted from ASCII to binary\n    /// if this option is specified.\n    #[clap(short, long, default_value = \"true\")]\n    pub convert_assets: bool,\n\n    /// If specified, enables all possible optimizations for the build.\n    #[clap(short, long, default_value = \"true\")]\n    pub enable_optimization: bool,\n}\n\npub fn cli_export(resource_manager: ResourceManager) {\n    let args = CliExportOptions::parse();\n\n    let options = ExportOptions {\n        target_platform: match args.target_platform.as_ref() {\n            \"android\" => TargetPlatform::Android,\n            \"pc\" => TargetPlatform::PC,\n            \"wasm\" => TargetPlatform::WebAssembly,\n            _ => panic!(\"unknown target platform {}!\", args.target_platform),\n        },\n        destination_folder: args.destination_folder,\n        include_used_assets: args.include_used_assets,\n        assets_folders: args.assets_folders,\n        ignored_extensions: args.ignored_extensions,\n        build_target: args.build_target,\n        run_after_build: args.run_after_build,\n        open_destination_folder: args.open_destination_folder,\n        convert_assets: args.convert_assets,\n        enable_optimization: args.enable_optimization,\n    };\n\n    export(options, Default::default(), resource_manager).unwrap();\n}\n","sourceCodeStart":323,"sourceCodeEnd":356,"githubUrl":"https://github.com/FyroxEngine/Fyrox/blob/76c91aad8eca488ce527b1af707be8b3b24ad72d/fyrox-build-tools/src/export/mod.rs#L323-L356","documentation":"ExportOptions construction parses the --target-platform CLI argument and only accepts \"android\", \"pc\", or \"wasm\"; any other string panics. The exporter needs a concrete platform to configure the build, and unknown values indicate a typo or an unsupported platform.","triggerScenarios":"Running the exporter (build_tools export) with --target-platform set to anything other than exactly \"android\", \"pc\", or \"wasm\" (case-sensitive).","commonSituations":"Typo in the CLI flag value (\"Android\", \"windows\", \"web\", \"wasm32\"); outdated scripts referencing a removed platform name; copy-pasted command from another project.","solutions":["Set --target-platform to one of: android, pc, wasm (exact lowercase spelling).","Check your build/export script or CI configuration for the correct value.","If you need another platform, patch the match in fyrox-build-tools/src/export/mod.rs to map it to a new TargetPlatform variant."],"exampleFix":"// before\nmygame --export --target-platform Windows\n// after\nmygame --export --target-platform pc","handlingStrategy":"validation","validationCode":"const VALID: [&str; 3] = [\"android\", \"pc\", \"wasm\"];\nif !VALID.contains(&args.target_platform.as_ref()) {\n    eprintln!(\"--target-platform must be one of {:?}\", VALID);\n    std::process::exit(2);\n}","typeGuard":"fn is_valid_platform(p: &str) -> bool {\n    matches!(p, \"android\" | \"pc\" | \"wasm\")\n}","tryCatchPattern":null,"preventionTips":["Use a shell-completion or wrapper script that only offers valid platforms.","Keep export commands in version-controlled scripts with correct values.","Remember the values are case-sensitive lowercase."],"tags":["cli","export","platform","invalid-argument"],"backgroundTag":"invalid-cli-argument","analyzedSha":"76c91aad8eca488ce527b1af707be8b3b24ad72d","analyzedAt":"2026-09-10T16:04:01.633Z","contentChangedAt":"2026-09-10T16:04:01.633Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}