{"record":{"id":"600900d9f5f0144d","repo":"slint-ui/slint","slug":"unable-to-generate-bindings","errorCode":null,"errorMessage":"Unable to generate bindings","messagePattern":"Unable to generate bindings","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"api/cpp/cbindgen.rs","lineNumber":1064,"sourceCode":"        using types::IntRect;\n        using types::Size;\n        using types::MouseEvent;\n\n        template<typename T> struct Option;\n        // This specialization provides a concrete C++ type for Option types\n        template<typename T>\n        struct Option<T *> {\n            T *ptr = nullptr;\n            Option() noexcept = default;\n            Option(T *p) noexcept : ptr(p) {}\n        };\n    }\n    template<typename ModelData> class Model;\n}\",\n        )\n        .with_trailer(gen_item_declarations(&items))\n        .generate()\n        .expect(\"Unable to generate bindings\")\n        .write_to_file(include_dir.join(\"slint_internal.h\"));\n\n    Ok(())\n}\n\nfn gen_backend_qt(\n    root_dir: &Path,\n    include_dir: &Path,\n    dependencies: &mut Vec<PathBuf>,\n) -> anyhow::Result<()> {\n    let mut config = default_config();\n\n    let items = [\n        \"NativeButton\",\n        \"NativeSpinBox\",\n        \"NativeCheckBox\",\n        \"NativeSlider\",\n        \"NativeProgressIndicator\",","sourceCodeStart":1046,"sourceCodeEnd":1082,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/api/cpp/cbindgen.rs#L1046-L1082","documentation":"Error \"Unable to generate bindings\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at api/cpp/cbindgen.rs:1064 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the cbindgen configuration and fix any items it cannot process.","Ensure all referenced types are visible to cbindgen."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016","analyzedAt":"2026-08-19T23:23:16.610Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}