2019-09-08 22:54:04 +02:00
2019-09-04 14:37:15 +02:00
2019-09-04 14:37:15 +02:00

smoke-tests [WIP]

A collection of frameworks used as a suite of smoke-tests for tauri

Basic Tests

The todomvc folder is composed of baseline apps from the todomvc projects. At the moment we're building:

  • angular2
  • polymer
  • react
  • vanillajs

They have not been modified in any way.

vanillajs/monolith

This is a hand-made monolithic html file. It should be good to just drop in. Soon we'll have a webpack and babel approach to do this as well.

vanillajs/duolith

This splits the monolith into an index.html and js/app.js files

quasar/monolith

This is a Quasar app that has been transpiled and un-chunked to make a single monolithic file. The toolchain to do this is not yet available.

test-drive

Assuming you have cargo and rust installed. If not, see below/

$ git clone https://github.com/tauri-apps/smoke-tests
$ cd smoke-tests/test
$ yarn
$ cargo install --path node_modules/@tauri-apps/tauri/tools/rust/cargo-tauri-bundle --force
$ yarn tauri build

After tauri has compiled its rust resources, look in the src-tauri/target/release/bundle.

Currently available in test/binaries:

  • MacOS app
  • Windows exe
  • Linux deb

Add Rust and Build Toolchain

Windows 64 or 32 bit

You will need to have Visual Studio and windows-build-tools installed.

First visit the Microsoft docs and install Visual Studio.

$ npm install --global windows-build-tools

If you are running Windows 64-bit, download and run rustupinit.exe and then follow the onscreen instructions.

If you are running Windows 32-bit, download and run rustupinit.exe and then follow the onscreen instructions.

Arch

According to the Arch manual, this is something you were born knowing. But seriously, if you want to help out explaining how newbies to Arch can do this, please feel free to make a PR to this doc.

BSD

Similar to Arch, you already have everything installed because you compile kernels. However:

  • Execution on OpenBSD requires wxallowed mount(8) option.
  • FreeBSD is also supported, to install webkit2 run pkg install webkit2-gtk3.

Ubuntu

First install Ubuntu then:

$ sudo apt update && sudo apt install libwebkit2gtk-4.0-dev build-essential

MacOS

$ brew install gcc

Everybody except Windows

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

We have audited this bash script, and it does what it says it is supposed to do. Nevertheless, before blindly curl-bashing a script, it is always wise to look at it first. Here is file as a mere download link

Make sure that rustc and cargo are in your $PATH. Run

$ rustc --version
latest update on 2019-07-04, rust version 1.37.0

and make sure you are on latest update on 2019-07-04, rust version 1.37.0 - otherwise be sure to update.

$ rustup update stable
$ rustup override set 1.37.0

About rustup (from their website)

rustup installs rustc, cargo, rustup and other standard tools to Cargo's bin directory. On Unix it is located at $HOME/.cargo/bin and on Windows at %USERPROFILE%\.cargo\bin. This is the same directory that cargo install will install Rust programs and Cargo plugins.

This directory will be in your $PATH environment variable, which means you can run them from the shell without further configuration. Open a new shell and type the following:

$ rustc --version

or run:

source $HOME/.cargo/env

# and then

$ rustc --version

If you don't see 1.37.0 or later, then you'll need to upgrade your rust.

$ rustup update stable
$ rustup override set 1.37.0

bundler

After you have installed Rust and the build toolchain, it is wise to open a new shell before continuing.

Setup the bundler:

$ cargo install --path node_modules/@tauri-apps/tauri/tools/rust/cargo-tauri-bundle --force

Want to debug?

*nix

$ cd src-tauri
$ RUST_DEBUG=1 cargo build

Windows

$ cd src-tauri
$ set RUST_DEBUG=1
$ cargo build

experimental anti-bloat features

see: https://github.com/RazrFalcon/cargo-bloat https://lifthrasiir.github.io/rustlog/why-is-a-rust-executable-large.html

add this to your /src-tauri/Cargo.toml (currently being used in the /test project)

[profile.release]
panic = "abort"
codegen-units = 1
lto = true

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. The TodoMVC projects are also Copyright (c) Addy Osmani, Sindre Sorhus, Pascal Hartig, Stephen Sawchuk and the respective authors.

Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-31T05:32:50.828Z
Readme MIT 92 MiB
Languages
JavaScript 26.3%
Dart 19.1%
Rust 16.3%
MDX 12.2%
Vue 9.4%
Other 16.7%