Here are the steps to build a desktop app with Bun.js and Chromium-based browsers:
Prerequisites
- Install Bun: `npm install -g bun`- Install Golang (for building the final app)
Steps
1. Clone the Bun.js desktop app project:
bash
git clone https://github.com/Bunland/webapp.git
2. Navigate to the project directory:
bash
cd webapp
3. Install dependencies:
bash
cd myapp
bun install
4. Run the app in development mode:
bash
cd ..
bun run dev
5. Build the final app:
bash
bun run build
This will use Golang to package your application. It will create a folder called `webapp_1.0.0` and a file `webapp_1.0.0.deb` which you can use to install the app.
6. Optionally, you can modify the app name and information in the `build-linux.sh` file. To change the icons, go to the `icons` folder and replace them with your preferred ones.
The project is based on Lorca which in turn uses Carlo.js. You can find more information about Lorca here: https://github.com/zserge/lorca
In summary, you use Bun for development and bundling, and Golang for the final packaging step to create a distributable app. The resulting app will run on Chromium-based browsers.
Citations:[1] https://github.com/Bunland/webapp
[2] https://bun.sh/blog/bun-v1.1
[3] https://stackoverflow.com/questions/8173232/how-to-make-exe-files-from-a-node-js-app
[4] https://github.com/oven-sh/bun/discussions/790
[5] https://www.electronjs.org
[6] https://www.builder.io/blog/bun-vs-node-js
[7] https://bunjs.run
[8] https://dev.to/buildwebcrumbs/building-a-desktop-app-with-javascript-4lge