Skip to content
/ adrift-native Public template

🌊 Template react app running natively in Windows, Linux and MacOS

License

Notifications You must be signed in to change notification settings

hmerritt/adrift-native

Repository files navigation

Adrift Native

Adrift is a template for React apps with batteries included.

Adrift Native can run your apps natively as a Windows, Linux and/or MacOS app (outside the browser as a standalone app).

Initial binary size (for Windows) is less-than 10MB, and as low as 3MB when compressed with upx.

Features

  • Wails template - build cross-platform native apps with Go + WebView
  • 🌊 Adrift template for frontend
  • 🏋️ CI/CD (Github Actions) to test, compile, and release for Windows, Linux, and MacOS

Screenshot

Getting started

Quick start, get up an running in one command:

git clone https://github.com/hmerritt/adrift-native && cd adrift-native && go run mage.go -v bootstrap && go run mage.go -v dev
  1. Install Wails dependencies (detailed instructions here)

  2. Clone this repo

  3. Install dependencies

    • go install github.com/magefile/mage
    • mage -v bootstrap
  4. Build the app with mage -v build

Scripts

Scripts are written in Go, and ran using the mage command.

Available scripts (mage -l for script list):

  • bootstrap - installs required dependencies (aims to be an all-in-one setup script)
  • test - runs all Go test files
  • dev - starts up dev server with live hot-reloading
  • build - builds production binaries to bin directory

Documentation

Electron? - Nope!

wails.io - Build beautiful cross-platform applications using Go.

Wails relies on WebView:

  • Less memory usage
  • Smaller binary size (<10MB)
  • Written in Go (Go is a better language for native apps from JS, and easier to work with than C/C++/Rust)