Home

Awesome

Angular Logo <img src="https://raw.githubusercontent.com/gilbarbara/logos/master/logos/tauri.svg" width="50">

Maintained Make a pull request License

Build

Watch on GitHub Star on GitHub Tweet

Introduction

Bootstrap and package your project with Angular 16 (Typescript + SASS + Hot Reload) and Tauri (Rust) for creating Desktop applications.

Currently runs with:

With this sample, you can:

/!\ Angular CLI needs Node 16 or later to work correctly.

Getting Started

Clone this repository locally:

git clone https://github.com/maximegris/angular-tauri.git

Install Tauri (Rust)

https://tauri.studio/docs/getting-started/prerequisites

Install dependencies with npm:

npm install

If you want to generate Angular components with Angular-cli , you MUST install @angular/cli in npm global context. Please follow Angular-cli documentation if you had installed a previous version of angular-cli.

npm install -g @angular/cli

Older @angular/cli references may grab angular version 15. To update to angular version 16 specifically for the global cli run:

npm install -g @angular/cli@^16

To build for development

Voila! You can use your Angular + Tauri app in a local development environment with hot reload!

The application code is managed by src-tauri/main.rs. \ In this sample, the app runs with a simple Angular App (http://localhost:4200), and a webView managed by Tauri.

Project structure

FolderDescription
src-tauriTauri main process folder (Rust)
srcTauri renderer process folder (Web / Angular)

Browser mode

Maybe you only want to execute the application in the browser with hot reload? Just run npm run web:serve.

Included Commands

CommandDescription
npm run web:serveExecute the app in the web browser (DEV mode)
npm run web:prodBuild the app that can be used directly in the web browser. Your built files are in the /dist folder.
npm run tauri:bundleBuilds your application and creates an app consumable based on your operating system

Your application is optimised. Only /dist folder is included in the final bundle.

Branch & Packages version