{"slug": "embedding-a-web-ui-into-a-native-desktop-application-comes-with-a-price", "title": "Embedding a web UI into a native desktop application comes with a price", "summary": "A developer's cross-platform desktop app project found that embedding web UIs via native web views (macOS WebKit, GTK WebKit, Windows WebView2) introduces platform-specific packaging and runtime issues. The developer reports that shipping Chromium Embedded Framework (CEF) with the app, despite larger size, simplifies cross-platform consistency by avoiding dependency problems on Linux and Windows.", "body_md": "I thought embedding a web UI into a native desktop application would be the easy part.\n\nAfter all... macOS has WebKit. Linux has GTK WebKit. Windows has WebView2.\n\nOne API per platform, smaller installers, native look & feel. Sounds perfect.\n\nThen reality arrived.\n\nHonestly, this was the easiest platform.\n\nSystem WebKit is there.\n\nIt behaves consistently.\n\nNo additional runtime.\n\nNo installer surprises.\n\nExactly what you'd expect from a platform component.\n\n10/10\n\nThings became... more interesting.\n\nGTK WebKit works, but suddenly packaging starts to matter.\n\nAn AppImage built on one distribution may refuse to start on another because some required WebKitGTK library isn't available.\n\nYour application itself is perfectly fine.\n\nThe user's system just doesn't happen to provide exactly the version your build expects.\n\nYou quickly discover that \"works on my machine\" has many regional dialects.\n\n7/10\n\nThis one surprised me the most.\n\nUnlike macOS, the web view isn't really just \"there.\"\n\nUsing WebView2 means depending on the Edge WebView runtime.\n\nIf the runtime isn't installed, congratulations—you now need another installer.\n\nSo your installer may install something whose purpose is to allow your application to display HTML.\n\nNot exactly the dependency story I was hoping for.\n\n2/10\n\nAt some point I asked myself:\n\nWhy am I spending time debugging operating-system packaging instead of building my application?\n\nSo I tried CEF (Chromium Embedded Framework).\n\nYes...\n\nThe application becomes larger.\n\nQuite a bit larger.\n\nBut in exchange:\n\n• Same rendering engine everywhere.\n\n• Same JavaScript engine everywhere.\n\n• Same debugging experience.\n\n• Same HTML/CSS behavior.\n\n• No Linux WebKit dependency lottery.\n\n• No separate WebView runtime installation on Windows.\n\n• One code path across all desktop platforms.\n\nIronically, shipping your own browser turned out to be simpler than relying on the browser already \"provided\" by the operating system.\n\nIt's one of those engineering decisions that looks wasteful on paper but ends up reducing complexity everywhere else.\n\nSometimes carrying the extra megabytes is cheaper than carrying platform-specific surprises.\n\nCurious what others have settled on.\n\nAre you using native web views, CEF, or something else for cross-platform desktop applications?", "url": "https://wpnews.pro/news/embedding-a-web-ui-into-a-native-desktop-application-comes-with-a-price", "canonical_source": "https://dev.to/valentinivanov/embedding-a-web-ui-into-a-native-desktop-application-comes-with-a-price-2f26", "published_at": "2026-09-07 12:45:20+00:00", "updated_at": "2026-09-07 12:57:39.690521+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["WebKit", "GTK WebKit", "WebView2", "Chromium Embedded Framework", "CEF", "macOS", "Linux", "Windows"], "alternates": {"html": "https://wpnews.pro/news/embedding-a-web-ui-into-a-native-desktop-application-comes-with-a-price", "markdown": "https://wpnews.pro/news/embedding-a-web-ui-into-a-native-desktop-application-comes-with-a-price.md", "text": "https://wpnews.pro/news/embedding-a-web-ui-into-a-native-desktop-application-comes-with-a-price.txt", "jsonld": "https://wpnews.pro/news/embedding-a-web-ui-into-a-native-desktop-application-comes-with-a-price.jsonld"}}