This is a small demo to accompany the Tauri + Yew tutorial

Overview

Tauri + Yew Demo

This is a small demo to accompany the Tauri + Yew tutorial

https://dev.to/stevepryde/create-a-desktop-app-in-rust-using-tauri-and-yew-2bhe

Installation

rustup target add wasm32-unknown-unknown
cargo install trunk
cargo install wasm-bindgen-cli
cargo install tauri-cli --version ^1.0.0-beta

Dev Server

After installing the above, you should be able to run it with

cargo tauri dev

Building the app

You can do a release build with

cargo tauri build

This should create an installer in src-tauri/target/release/bundle/

Further reading

Tauri: https://tauri.studio/en/docs/get-started/intro

Yew: https://yew.rs/docs/getting-started/introduction

Comments
  • Some questions

    Some questions

    Nice. However, I am not quite sure how to compile and also run your demo. Clearly I need to read more about Tauri but it would help if your docs include that information (the Tauri docs seem to also hide this info someplace).

    Also, cargo install tauri-cli --version ^1.0.0-beta is failing with the docker rust:1.58.1 image as a remote development environment resulting in the following messages (What version is compatible?):

       Compiling handlebars v4.2.1
       Compiling json-patch v0.2.6
       Compiling tauri-bundler v1.0.0-beta.4
       Compiling tauri-cli v1.0.0-beta.7
    error[E0432]: unresolved import `clap::crate_version`
     --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/tauri-cli-1.0.0-beta.7/src/main.rs:6:12
      |
    6 | use clap::{crate_version, load_yaml, App, AppSettings, ArgMatches};
      |            ^^^^^^^^^^^^^ no `crate_version` in the root
    
    error: cannot determine resolution for the macro `crate_version`
       --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/tauri-cli-1.0.0-beta.7/src/main.rs:265:14
        |
    265 |     .version(crate_version!())
        |              ^^^^^^^^^^^^^
        |
        = note: import resolution is stuck, try simplifying macro imports
    
    error[E0308]: mismatched types
       --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/tauri-cli-1.0.0-beta.7/src/main.rs:264:23
        |
    264 |   let app = App::from(yaml)
        |                       ^^^^ expected struct `App`, found `&yaml_rust::yaml::Yaml`
    
    opened by gdennie 3
  •  Additional property 'useBootstrapper' is not allowed

    Additional property 'useBootstrapper' is not allowed

    # cargo tauri dev
    `tauri.conf.json` error on `tauri > bundle > deb`: Additional property 'useBootstrapper' is not allowed
    `tauri.conf.json` error on `tauri > bundle > macOS`: Additional property 'useBootstrapper' is not allowed
    
    
    opened by maurerdietmar 2
  • Updated tauri-cli

    Updated tauri-cli

    Thanks for the awesome article :-) I had to tweak the installation of tauri-cli like so...

    cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch next
    

    (According to https://github.com/tauri-apps/tauri/issues/3050)

    Here are the steps I used to run your demo on PinePhone...

    https://gist.github.com/lupyuen/5566af817e964ecf25488e5cbe8c2ea1

    Thanks again :-)

    opened by lupyuen 2
  • Do you like to work with me on this project.

    Do you like to work with me on this project.

    I am using your template for my project. It is a notion.so clone, But I am trying to enhance everything. For example, notion.so is a bit slow and take too much memory because they are using electron while we can use tauri. click here to see my project, my discord id Alisci#1598. If you joined me I would pay U for your work. This is not just free github community project.

    opened by AlenSci 1
  • fix: application identifier prevents build

    fix: application identifier prevents build

    This fixes an error that occurs when trying to build using a more up to date tauri cli

    cargo tauri build
           Error You must change the bundle identifier in `tauri.conf.json > tauri > bundle > identifier`. The default value `com.tauri.dev` is not allowed as it must be unique across applications.
    
    opened by grayfallstown 1
  • Tauri 1.0.0-rc.2 Doesn't Display UI on Release Build

    Tauri 1.0.0-rc.2 Doesn't Display UI on Release Build

    System info:

    Linux pop-os 5.15.15-76051515-generic #202201160435~1642693824~21.10~97db1bb SMP T x86_64 x86_64 x86_64 GNU/Linux
    

    Operating System: Pop!_OS 21.10 GNOME version: 40.4.0 Kernel version: 5.15


    What?

    With tauri = "1.0.0-beta.8" and tauri-build = "1.0.0-beta.4"

    I built the release binary using cargo tauri build and ran the executable at src-tauri/target/release/tauri-yew-demo.

    I am able to see the "Hello, World" text in the window. I can also see the text using cargo tauri dev.

    image

    With tauri = "1.0.0-rc.2" and tauri-build = "1.0.0-rc.2"

    I updated the Tauri dependency using cd src-tauri && cargo update -p tauri, following this: https://tauri.studio/docs/development/updating-dependencies.

    Building release artifacts with cargo tauri build doesn't produce any errors, however, I cannot see the text in the window when I run the new release executable at src-tauri/target/release/tauri-yew-demo. However, with cargo tauri dev, the text appears.

    image

    Why I'm filing this issue

    I'm not sure if there is a regression from Tauri but wanted to check here first.

    Expected

    I expect the latest version of Tauri, 1.0.0-rc.2 to build release executables that displays content from Yew.

    Steps to reproduce

    1. Clone this repo and ensure the HEAD commit is at 25c5183.
    2. Build the project using cargo tauri build and run the built executable at src-tauri/target/release/tauri-yew-demo. Verify that the window displays the "Hello, World" text.
    3. Run the project in development with cargo tauri dev and verify that the window displays the "Hello, World" text.
    4. Update the Tauri dependency following the steps outlined in https://tauri.studio/docs/development/updating-dependencies.
      cd src-tauri && cargo update -p tauri
      
    5. Build the project using cargo tauri build and run the built executable at src-tauri/target/release/tauri-yew-demo. Observe the window does not display the "Hello, World" text.
    6. Run the project in development with cargo tauri dev and verify that the window displays the "Hello, World" text.
    opened by gondolyr 1
Owner
Steve Pryde
Steve Pryde
SimpleX Chat GUI built with Rust, Tauri and Yew

simplex-desktop A desktop application for simplex-chat. WIP, contributions are welcome. Architecture For the back end we rust with tauri and frontend

Simon Shine 5 Feb 28, 2023
Demo provider, source code for the Provider tutorial.

Fiberplane "Catnip" (tutorial) provider This repository contains the final code of the provider built within the "Create a Provider" tutorial. It reli

Fiberplane 4 Feb 15, 2023
🦀 Small Tauri SolidJS Example feat. Vite

Tauri Solid Example (2022) Simple Solid(vite) starter running with Tauri. Should hopefully save some time trying to setup Tauri and Solid. Currently c

Luke Secomb 14 Oct 25, 2022
A fork of yew-router

Yew Router (fork) This is fork of version 0.15 of the yew-router. Motivation The main motivation behind the fork is the lack of nested router support

Jens Reimann 2 Jan 4, 2022
A lightning fast state management module for Yew.

yewv A lightning fast state management module for Yew built with performance and simplicity as a first priority. Who is this for? If you wish to use a

null 7 Dec 8, 2022
A framework experience for Yew.

stackable A framework experience for Yew. Stackable provides a development stack with: Tooling around Server-side Rendering Support. An easy-to-use, S

Kaede Hoshikawa 8 Dec 30, 2022
Styling framework for Yew ✂

??‍♂️ + ?? -> Hallings - components for Yew ❓ Purpose What if there existed a couple of pre-built components for yew like password strength checker or

David Styrbjörn 3 Jan 6, 2023
Scaffold that provides a basic setup for a Yew app with DaisyUI for styling.

Yew and Tailwind CSS Scaffold This scaffold provides a basic setup for a Yew app with Tailwind CSS for styling. It also includes DaisyUI, a Tailwind C

Alessio Marchi 6 Mar 3, 2023
Awesome full-stack template using Yew and Rust

Docker + Actix + Yew Full Stack Template ??‍?? YouTube videos Full Stack Rust App Template using Yew + Actix! https://youtu.be/oCiGjrpGk4A Add Docker

Security Union 143 Jun 22, 2023
Nannou/Rust tutorial based on Schotter by Georg Nees

Schotter (German for gravel) is a piece by computer art pioneer Georg Nees. It consists of a grid of squares 12 across and 22 down with random rotation and displacement that increases towards the bottom.

null 101 Dec 27, 2022
Full tutorial on coding AI function calling in Rust programming by [Jeremy Chone](https://youtube.com/jeremychone)

Full tutorial on coding AI function calling in Rust programming by Jeremy Chone. We will be using the OpenAI API, but similar approaches can be applie

null 14 May 26, 2024
Cross-platform Window library in Rust for Tauri. [WIP]

Cross-platform application window creation library in Rust that supports all major platforms like Windows, macOS, Linux, iOS and Android. Built for you, maintained for Tauri.

Tauri 899 Jan 1, 2023
Hydrogen is the desktop application for Geplauder, built with tauri studio.

Hydrogen Hydrogen is the desktop application for Geplauder, built with tauri studio. For more information on Geplauder, click here. Usage To configure

null 4 Nov 21, 2021
Helps positioning your tauri windows.

Tauri plugin positioner A plugin for tauri that helps positioning you windows at well known locations. Install Rust [dependencies] tauri-plugin-positi

Jonas Kruckenberg 42 Jan 5, 2023
A custom invoke system for Tauri that leverages a localhost server

Tauri Invoke HTTP This is a crate that provides a custom invoke system for Tauri using a localhost server. Each message is delivered through a XMLHttp

Tauri 17 Dec 17, 2022
📦 Port of tauri-bundler

?? Port of tauri-bundler You can now easily create installers for your Deno apps, thanks to the amazing work of Tauri ??

Marc Espín 28 Dec 7, 2022
Type-safe IPC for Tauri using GraphQL

Tauri Plugin graphql A plugin for Tauri that enables type-safe IPC through GraphQL. Install Rust [dependencies] tauri-plugin-graphql = "0.2" JavaScrip

Jonas Kruckenberg 40 Dec 29, 2022
A Raycast/Spotlight like app shell using tauri

Tauri Shell This repo can be used as reference for building alfred/raycast/spotlight apps using Tauri. Usage This reference repository is using Svelte

Shivaprasad Bhat 6 Oct 27, 2022
Bindings to the Tauri API for projects using wasm-bindgen

tauri-sys Raw bindings to the Tauri API for projects using wasm-bindgen Installation This crate is not yet published to crates.io, so you need to use

Jonas Kruckenberg 25 Jan 9, 2023