stevepryde / tauri-yew-demo Goto Github PK
View Code? Open in Web Editor NEWDemo project for the Tauri + Yew tutorial
License: MIT License
Demo project for the Tauri + Yew tutorial
License: MIT License
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`
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
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
.
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.
I'm not sure if there is a regression from Tauri but wanted to check here first.
I expect the latest version of Tauri, 1.0.0-rc.2
to build release executables that displays content from Yew.
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.cargo tauri dev
and verify that the window displays the "Hello, World" text.cd src-tauri && cargo update -p tauri
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.cargo tauri dev
and verify that the window displays the "Hello, World" text.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.
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 tauri-apps/tauri#3050)
Here are the steps I used to run your demo on PinePhone...
https://gist.github.com/lupyuen/5566af817e964ecf25488e5cbe8c2ea1
Thanks again :-)
I've had no success running the code pulled from your github repo to my Windows 10 Pro system. My Windows system has the latest Microsoft updates and is at version '10.0.19045 build 19045'. After using cargo to build both 'frontend' and 'src-tauri', then from a Windows console window (as administrator) while in the 'frontend' folder I execute 'trunk serve', and get the following error dump =>
D:\Users\ricej\temp\tauri-yew-demo\frontend>trunk serve
2023-03-12T02:23:46.441113Z INFO starting build
2023-03-12T02:23:46.441669Z INFO spawning asset pipelines
2023-03-12T02:23:46.593521Z INFO copying & hashing css path="\\?\D:\Users\ricej\temp\tauri-yew-demo\frontend\public\main.css"
2023-03-12T02:23:46.593563Z INFO building frontend
2023-03-12T02:23:46.594512Z INFO finished copying & hashing css path="\\?\D:\Users\ricej\temp\tauri-yew-demo\frontend\public\main.css"
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
2023-03-12T02:23:46.788618Z INFO fetching cargo artifacts
2023-03-12T02:23:46.975206Z INFO processing WASM for frontend
2023-03-12T02:23:47.082674Z INFO calling wasm-bindgen for frontend
2023-03-12T02:23:47.201041Z INFO copying generated wasm-bindgen artifacts
2023-03-12T02:23:47.213439Z INFO applying new distribution
2023-03-12T02:23:47.332995Z INFO success
2023-03-12T02:23:47.339331Z INFO serving static assets at -> /
thread 'tokio-runtime-worker' panicked at 'error binding to 127.0.0.1:8080: error creating server listener: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)', C:\Users\Jerry W. Rice.cargo\registry\src\github.com-1ecc6299db9ec823\hyper-0.14.19\src\server\server.rs:77:13
stack backtrace:
0: 0x7ff7898b8f64 -
1: 0x7ff78960053b -
2: 0x7ff7898973e1 -
3: 0x7ff7898bcfcb -
4: 0x7ff7898bcb97 -
5: 0x7ff7898bdaf7 -
6: 0x7ff7898bd596 -
7: 0x7ff7898bd4df -
8: 0x7ff7898bd4b4 -
9: 0x7ff7899a8c95 -
10: 0x7ff78954bfd2 -
11: 0x7ff78947b864 -
12: 0x7ff7894667ca -
13: 0x7ff7898d82d1 -
14: 0x7ff7898d622e -
15: 0x7ff7898cb0d4 -
16: 0x7ff7898caddd -
17: 0x7ff7898b588b -
18: 0x7ff96de67614 - BaseThreadInitThunk
19: 0x7ff96e4e26a1 - RtlUserThreadStart
I've a c++ and rust systems developer, but I'm a newbie when it does to Web development and javascript (as well as WASM). Do you have any suggestions?
Jerry W. Rice
# 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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.