Jump to content

3 MB Native HTML5 Game with Tauri


Literal Line
 Share

Recommended Posts

So I was able to turn an old game I ported to Javascript into a native desktop app (native game -> HTML5 game -> native game, it's weird I know). I used Tauri  for this, which is similar Electron, but instead of using Chromium and Node.js it uses the system's webview for rendering and a lightweight backend written in Rust. In the case of Windows 10, the webview is WebView2. A possible downside of WebView2 is that the installer is 100 megabytes, but once you have it installed you can run any Tauri app. WebView2 also supposedly comes preinstalled with Windows 10 in the April update.

 

The binary for the game's build was only 8 megabytes in size. After compressing with UPX, the filesize was reduced to only 3 megabytes. The app is so small in fact that I can upload it right here ?.

If I built this app with Electron, the filesize would most likely be at least 100 megabytes.

 

Here is the resource usage for the game:

CPU usage: 0-0.1%

RAM usage: 12.4 megabytes

 

You can download the game here and try it out. You must have WebView2 installed or the app will close.

pubie tauri resources.png

Pubie.exe

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...