Code Monkey home page Code Monkey logo

aweasome-app's Introduction

Rust Desktop App Code Template (following AwesomeApp Blueprint)

Base desktop application code with Tauri, Native Web Components, and SurrealDB (follow the VMES app architecture)

See awesomeapp.dev for more info

Troubleshooting | Changelog | Discord Awesome App

Note: To enable persitent storage, edit the src-tauri/Cargo.toml to enable all surrealdb features.

Hot Reload dev

For hot-reload UI and Tauri development, run the following in your VSCode from this root folder:

awesome-app dev

This assumes awesome-app was installed locally (e.g., cargo install awesome-app)

IMPORTANT - Requires node.js v8 and above.

How it works

awesome-app dev will create an Awesome.toml which will be the list of commands it will run (format is self-explanatory).

You can run the commands manually if you want, or see below for list of commands.

We recommend using awesome-app dev but running each command manually might help troubleshoot.

Build manually

IMPORTANT: Make sure to have node.js latest of 16 or above.

  • npm run tauri icon src-tauri/icons/app-icon.png - This will build the application icons.

  • npm run pcss - This will build the postcss files (src-ui/pcss/**/*.pcss).

  • npm run rollup - This will build and package the typescript files (src-ui/src/**/*.ts).

  • npm run localhost - This will run a localhost server with the dist/ folder as root (frontend hot reload)

  • In another terminal, npm run tauri dev - Will start the Tauri build and start the process.


Troubleshooting

  • Make sure to have node.js 18 or above.

  • If some cryptic errors, run the command above one by one.

  • If npm tauri dev commands fail, try to do:

    • cd src-tauri
    • cargo build
    • This might be an important first step when using full surrealdb (i.e., with default features and not only kv-mem)
  • It failed to compile and came up with the error failed to download replaced source registry crates-io. Deleting the cargo.lock file and package-lock.json file fixed it.

  • Installing Tauri in case some issues:

# install latest tauri in case there is none
npm i -g @tauri-apps/cli @tauri-apps/api

Requirements on fedora 36:

On Fedora, and probably linux, the following needs to be present on the system.

dnf install gtk3-devel
dnf install webkit2gtk3-jsc-devel 
dnf install libsoup-devel
dnf install webkit2gtk3-devel.x86_64

Requirements on Ubuntu 20

npm i
npm i -g tauri
sudo aptitude install -y \
  build-essential \
  libpango1.0-dev \
  libsoup2.4-dev \
  libjavascriptcoregtk-4.0-dev \
  libgdk-pixbuf2.0-dev \
  libgtk-3-dev \
  libwebkit2gtk-4.0-dev
npm run tauri dev



This repo on GitHub

aweasome-app's People

Contributors

fiammamuscari avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.