Code Monkey home page Code Monkey logo

smoke-tests's Introduction

Examples

A collection of examples of Tauri apps using frontends written in Rust or JavaScript.

These examples are a great way to see how Tauri works with a variety of frameworks.

Uses the template project of each framework.

How to run

Ensure that you have read the README of the example to check that your first-time setup is done.

The examples assume that this git repository was cloned in the root of the tauri repo clone on your machine. The recommended way of running the examples is using mask:

$ cargo install mask
$ git clone https://github.com/tauri-apps/tauri
$ cd tauri
$ mask prepare
$ mask list smoke-tests # this will show all the examples names
$ mask run smoke-test some-example-name # run an example listed on the previous command

Error reporting

Please report all library errors at https://github.com/tauri-apps/tauri

License

Everything in this repo is MIT License unless otherwise specified.

smoke-tests's People

Contributors

alvelarsson avatar benoitranque avatar dependabot[bot] avatar diit avatar fungos avatar jbolda avatar khrj avatar lucasfernog avatar nklayman avatar nothingismagick avatar philip-peterson avatar rajivshah3 avatar renovate-bot avatar renovate[bot] avatar rstoenescu avatar tensor-programming avatar tytrdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smoke-tests's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Detected empty commit - aborting git push

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
node/react/create-react-app/src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
node/react/gatsby-themed-site/src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
node/react/next.js/src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
node/svelte/svelte-app/src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
node/vanillajs/monolith/src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
node/vue/nuxt-app/src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
node/vue/quasar-app/src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
node/vue/vue-cli-app/src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
rust/yew/todomvc/src-tauri/Cargo.toml
  • serde_json 1.0.116
  • serde 1.0.200
  • tauri 1.6.2
  • tauri-build 1.5.1
rust/yew/todomvc/todomvc/Cargo.toml
  • strum 0.26.2
  • strum_macros 0.26.2
  • serde 1.0.200
  • serde_derive 1.0.200
  • yew 0.21.0
transpiled/flutter/src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
  • tauri 1.0.0-beta-rc.4
  • tauri-build 1.0.0-beta-rc.1
transpiled/mint-tauri-starter/src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
  • tauri 1.0.0-beta-rc.4
  • tauri-build 1.0.0-beta-rc.1
transpiled/reason-react/src-tauri/Cargo.toml
  • serde_json 1.0
  • serde 1.0
  • tauri 1.0.0-beta-rc.4
  • tauri-build 1.0.0-beta-rc.1
github-actions
.github/workflows/build-node-smoke-tests.yml
npm
node/react/create-react-app/package.json
  • @testing-library/jest-dom 6.4.6
  • @testing-library/react 16.0.0
  • @testing-library/user-event 14.5.2
  • react 18.3.1
  • react-dom 18.3.1
  • react-scripts 5.0.1
  • @craco/craco 7.1.0
node/react/gatsby-themed-site/package.json
  • @emotion/core 11.0.0
  • @jbolda/gatsby-theme-articles 0.4.6
  • @jbolda/gatsby-theme-homepage 0.3.3
  • @jbolda/gatsby-theme-layout 0.3.5
  • @mdx-js/mdx 3.0.1
  • @mdx-js/react 3.0.1
  • gatsby 5.13.6
  • gatsby-image 3.11.0
  • gatsby-plugin-mdx 5.13.1
  • gatsby-plugin-netlify 5.1.1
  • gatsby-plugin-react-helmet 6.13.1
  • gatsby-plugin-sharp 5.13.1
  • gatsby-plugin-theme-ui 0.16.2
  • gatsby-source-filesystem 5.13.1
  • gatsby-transformer-sharp 5.13.1
  • react 18.3.1
  • react-dom 18.3.1
  • react-helmet 6.1.0
  • theme-ui 0.16.2
  • @babel/plugin-proposal-optional-chaining 7.21.0
  • babel-preset-gatsby 3.13.2
node/react/next.js/package.json
  • next 14.2.4
  • react 18.3.1
  • react-dom 18.3.1
node/svelte/svelte-app/package.json
  • svelte 4.2.18
  • @babel/core 7.24.7
  • @babel/preset-env 7.24.7
  • @rollup/plugin-commonjs 26.0.1
  • @rollup/plugin-node-resolve 15.2.3
  • core-js 3.37.1
  • rollup 4.18.0
  • @rollup/plugin-babel 6.0.4
  • rollup-plugin-css-only 4.5.2
  • rollup-plugin-livereload 2.0.5
  • rollup-plugin-svelte 7.2.2
  • @rollup/plugin-terser 0.4.4
  • sirv-cli 2.0.2
node/vanillajs/monolith/package.json
node/vue/nuxt-app/package.json
  • nuxt 3.12.2
  • @tauri-apps/tauri-webpack 0.2.0
node/vue/quasar-app/package.json
  • @quasar/extras 1.16.11
  • @tauri-apps/api 1.5.6
  • core-js 3.37.1
  • quasar 2.16.4
  • @quasar/app 3.3.3
  • @tauri-apps/tauri-webpack 0.2.0
  • @vue/eslint-config-standard 8.0.1
  • @babel/eslint-parser 7.24.7
  • eslint 9.5.0
  • eslint-loader 4.0.2
  • eslint-plugin-import 2.29.1
  • eslint-plugin-n 17.9.0
  • eslint-plugin-promise 6.2.0
  • eslint-plugin-standard 5.0.0
  • eslint-plugin-vue 9.26.0
  • execa 9.2.0
  • pkg 5.8.1
  • workbox-webpack-plugin 7.1.0
  • node >= 8.9.0
  • npm >= 5.6.0
  • yarn >= 1.6.0
node/vue/vue-cli-app/package.json
  • core-js 3.37.1
  • vue 3.4.29
  • @vue/cli-plugin-babel 5.0.8
  • @vue/cli-plugin-eslint 5.0.8
  • @vue/cli-service 5.0.8
  • @babel/eslint-parser 7.24.7
  • eslint 9.5.0
  • eslint-plugin-vue 9.26.0
  • vue-cli-plugin-tauri 1.0.0
  • vue-template-compiler 2.7.16
package.json
rust/yew/todomvc/package.json
transpiled/flutter/package.json
transpiled/mint-tauri-starter/package.json
transpiled/reason-react/package.json
pub
transpiled/flutter/pubspec.yaml

  • Check this box to trigger a request for Renovate to run again on this repository

Rust compile error for rustfmt

Getting an unstable error while trying to run an example:

rustc:

mask run example react/create-react-app
  Compiling idna v0.2.0
   Compiling semver-parser v0.10.1
error[E0658]: non-builtin inner attributes are unstable
 --> /home/fernandob/.cargo/registry/src/github.com-1ecc6299db9ec823/semver-parser-0.10.1/src/generated.rs:4:1
  |
4 | #![rustfmt::skip]
  | ^^^^^^^^^^^^^^^^^
  |
  = note: for more information, see https://github.com/rust-lang/rust/issues/54726

   Compiling quote v1.0.7
error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: could not compile `semver-parser`.
warning: build failed, waiting for other jobs to finish...
error: build failed


How to run the examples?

I'm following the toplevel README, and for mask list examples I get:

react/create-react-app
react/gatsby-themed-site
react/next.js
svelte/svelte-app
vanillajs/monolith
vue/nuxt-app
vue/quasar-app
vue/vue-cli-app
yew/todomvc
communication/dist
communication/src-tauri
flutter_example/lib
flutter_example/src-tauri
flutter_example/test
flutter_example/web
mint-tauri-starter/public
mint-tauri-starter/source
mint-tauri-starter/src-tauri
mint-tauri-starter/tests
reason-react/src
reason-react/src-tauri

but mask run example communication gives

sh: line 0: shopt: globstar: invalid shell option name
unknown project ./communication

and mask run example communication/dist yields:

sh: line 0: shopt: globstar: invalid shell option name
unknown project communication/communication/dist

Also, how would I use these samples as a starter for my own project, without cloning it in the root of a tauri clone?

React Examples suggestion

I think the examples in general can gain from some additional details to show what is possible, but since I am using react I put that on the title. The example is really just cra cli + tauri cli added and init with nothing else added, that's something anyone can do in the cli. Would be useful if you show how to call rust from a js file, how to call a promise, how to call a rust function from js that returns something, etc. And anything else that's possible with tauri that's not possible with electron so people can see the contrast. Then people can decide if is worth using tauri or not, for me coming from JS I want to be able to see all the possibilities and if I like what I see in terms of performance and binary size then I can spend some time to learn rust properly.

  • To summarize show the IPC in the examples.

I clicked on every tauri react example on github, and 99% are really just templates for cra + tauri. I think only one had an example of using the Promisified function. There isn't really much out there as far as tutorials or examples, so it makes it really hard to do anything with it.

failed to build todomvc

error: failed to run custom build command for `yew v0.14.1`

--- stderr
thread 'main' panicked at 'Yew requires selecting either the `web_sys` or `std_web` cargo feature'

yew/todomvc issues

  1. yew/todomvc needs cargo-web (maybe mask prepare should install it aswell?)
alex@Alekseis-MBP tauri % mask run smoke-test yew/todomvc
sh: line 0: shopt: globstar: invalid shell option name
error: no default package; you can specify a crate to use with the `-p` argument
yarn add v1.22.10
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ”¨  Building fresh packages...
success Saved 0 new dependencies.
✨  Done in 0.08s.
yarn install v1.22.10
[1/4] πŸ”  Resolving packages...
success Already up-to-date.
✨  Done in 0.07s.
yarn run v1.22.10
error Command "tauri" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
alex@Alekseis-MBP tauri % which tauri
/usr/local/bin/tauri

P.S. Readme out of date: mask list/run examples is now mask list/run smoke-tests

Cannot find module rust-cli

Hi,

I try atm to run the vue/nuxt-app.
This are my steps:

cargo install mask
git clone https://github.com/tauri-apps/tauri
cd tauri
git clone https://github.com/tauri-apps/smoke-tests
mask prepare
mask run smoke-test vue/nuxt-app

Now I get:
Cannot find module 'chalk'

So I install it:
yarn add chalk

And again something missing:
Cannot find module 'update-notifier'

After that I get:
Error: Cannot find module '../dist/helpers/rust-cli'

Now I tried different things:

tauri init
yarn add tauri
yarn add @tauri-apps/api
yarn add tauri-cli
yarn add @tauri-apps/cli
yarn add --dev @tauri-apps/cli
mask run smoke-test vue/nuxt-app

but nothing worked.

move tauri-apps/examples here

tauri-apps/gitian is going to validate itself by running the smoke tests. this seems like an opportune time to start the transition to the submodule approach for the core repo and move the smoke tests back here. also because these smoke tests are nuking wednesdays for us because so many machines are running and there's no way to get important changes merged into dev without potentially waiting hours.

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.