25 ms·
> deno desktop is opinionated about those tradeoffs: > Small by default, full Node compatibility I tried `deno desktop index.ts` with the 5-line Hello world i
by josephernest 3mo ago
> deno desktop is opinionated about those tradeoffs:
> Small by default, full Node compatibility
I tried `deno desktop index.ts` with the 5-line Hello world in the article.
Result (Windows 10): 442 MB. Ouch.
I thought it would be smaller than an Electron build, but it's far worse. Did I do something wrong?
(libcef.dll: 247 MB)
(deno-test.dll: 78 MB <- contains the hello world)
- josephernest 3mo agoIIRC Electron hello world is ~ 100-150 MB because it bundles a browser/Chromium runtime. So I hoped we could have a <= 20 MB solution by reusing the OS webview or similar. Having more than 400 MB is a bit deceptive for me. (Again: maybe I just did something wrong in the config: should I do something else than `deno desktop test.ts`?)
- fny 3mo agolibcef is the Chromium embedded framework[0], so your build isn't using a webview or maybe its using both. I just tried it on my mac, and I can't keep libcef out even with `--backend webview`. https://github.com/chromiumembedded/cef https://github.com/chromiumembedded/cef
- undefined_void 3mo agoTry the webview backend: `deno desktop --backend webview`
- IdiotSavage 3mo agoThe docs say that's the default: https://docs.deno.com/runtime/desktop/backends/#webview-(default) https://docs.deno.com/runtime/desktop/backends/#webview-(def...
- crowlKats 3mo agoapologies, this is inaccurate currently, will get things updated
- josephernest 3mo agoThis gives a 77 MB folder, not containing the browser (we're now using the OS' webview). I wouldn't call this "Small by default". I used this main.ts file: `Deno.serve(() => new Response("<h1>Hello, desktop</h1>", { headers: { "content-type": "text/html" }, }));` and `deno desktop --backend webview main.ts`. Unfortunately, launching `deno-test.bat` opens an empty white window, freezed (with waiting cursor...) on my Windows 10.
- dominicrose 3mo agoWith Visual Studio and Photino, after some tweaking I managed to publish everything in a single .exe file. In Debug mode it produces more files to have source maps that work well. There's no hot-reload but at least it works well. The Photino app is 18 Mb and it's a real app not a hello world. I'm not sure how much RAM it used since maybe it uses a secondary process (edge webview). I tried deno desktop with the minimal js file to see if I can avoid relying on VS and C# but it's really bad currently, at least on Windows. Both the webview and the cef backend produce multiple files and are we supposed to launch a .bat file? It opens a terminal Window (what the hell?) and a UI that doesn't even work. I got to see the Hello message in cef mode but the unicode emoticon doesn't work.