Giter Site home page Giter Site logo

tauri-apps / tauri Goto Github PK

View Code? Open in Web Editor NEW
77.1K 488.0 2.3K 80.56 MB

Build smaller, faster, and more secure desktop applications with a web frontend.

Home Page: https://tauri.app

License: Apache License 2.0

Rust 81.48% JavaScript 2.04% Shell 1.80% TypeScript 7.32% Batchfile 0.07% PowerShell 0.16% AppleScript 0.07% Standard ML 0.05% CSS 0.07% HTML 0.08% Svelte 0.07% Dockerfile 0.09% NSIS 3.43% Kotlin 2.50% Swift 0.73% Ruby 0.03% C++ 0.01% Objective-C++ 0.01% Objective-C 0.02%
rust webview high-performance works-with-vue works-with-gatsby works-with-svelte works-with-react works-with-quasar works-with-phaser works-with-yew

tauri's Introduction

Tauri

status License test core FOSSA Status Chat Server website https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg support

Introduction

Tauri is a framework for building tiny, blazingly fast binaries for all major desktop platforms. Developers can integrate any front-end framework that compiles to HTML, JS and CSS for building their user interface. The backend of the application is a rust-sourced binary with an API that the front-end can interact with.

The user interface in Tauri apps currently leverages tao as a window handling library on macOS, Windows, Linux, Android and iOS. To render your application, Tauri uses WRY, a library which provides a unified interface to the system webview, leveraging WKWebView on macOS & iOS, WebView2 on Windows, WebKitGTK on Linux and Android System WebView on Android.

To learn more about the details of how all of these pieces fit together, please consult this ARCHITECTURE.md document.

Getting Started

If you are interested in making a tauri app, please visit the documentation website.

The quickest way to get started is to install the prerequisites for your system and create a new project with create-tauri-app. For example with npm:

npm create tauri-app@latest

Features

The list of Tauri's features includes, but is not limited to:

  • Built-in app bundler to create app bundles in formats like .app, .dmg, .deb, .rpm, .AppImage and Windows installers like .exe (via NSIS) and .msi (via WiX).
  • Built-in self updater (desktop only)
  • System tray icons
  • Native notifications
  • Localhost free (๐Ÿ”ฅ)
  • GitHub action for streamlined CI
  • VS Code extension

Platforms

Tauri currently supports development and distribution on the following platforms:

Platform Versions
Windows 7 and above
macOS 10.15 and above
Linux webkit2gtk 4.0 for Tauri v1 (for example Ubuntu 18.04). webkit2gtk 4.1 for Tauri v2 (for example Ubuntu 22.04).
iOS/iPadOS (alpha) 9 and above
Android (alpha) 7 and above

Contributing

Before you start working on something, it's best to check if there is an existing issue first. It's also a good idea to stop by the Discord server and confirm with the team if it makes sense or if someone else is already working on it.

Please make sure to read the Contributing Guide before making a pull request.

Thank you to everyone contributing to Tauri!

Documentation

Documentation in a polyglot system is a tricky proposition. To this end, we prefer to use inline documentation in the Rust & JS source code as much as possible. Check out the hosting repository for the documentation site for further information: https://github.com/tauri-apps/tauri-docs

Partners

CrabNebula

For the complete list of sponsors please visit our website and Open Collective.

Organization

Tauri aims to be a sustainable collective based on principles that guide sustainable free and open software communities. To this end it has become a Programme within the Commons Conservancy, and you can contribute financially via Open Collective.

Licenses

Code: (c) 2015 - Present - The Tauri Programme within The Commons Conservancy.

MIT or MIT/Apache 2.0 where applicable.

Logo: CC-BY-NC-ND

FOSSA Status

tauri's People

Contributors

amrbashir avatar beanow avatar betamos avatar chippers avatar dependabot[bot] avatar fabianlars avatar github-actions[bot] avatar i-c-b avatar jbolda avatar jhutchins avatar jonaskruckenberg avatar laegel avatar legend-master avatar lemarier avatar lorenzolewis avatar lucasfernog avatar luoffei avatar martinfrances107 avatar meowtec avatar nklayman avatar nothingismagick avatar olivierlemasle avatar pewsheen avatar probablykasper avatar rajivshah3 avatar renovate[bot] avatar simonhyll avatar tensor-programming avatar thadguidry avatar zakpatterson 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tauri's Issues

Opt-In Telemetry, Security Patching and Environment Dumps

Is your feature request related to a problem? Please describe.
Allowing users to opt-in to telemetric submission will help the core team figure out how tauri is being used in devland. Making the approach public will help devland know how their users are getting on with Tauri apps.

Describe the solution you'd like
I think there is a good start here:
https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-telemetry/src/index.js
Combined with antivuln, it would be an excellent way for us to provide an additional service layer for those who want us to manage their security. Before you laugh and say I would never do that, just stop and think for a moment about how much work it is to stay on top of dependencies in today's development environment.

Additional context
I think in combination with #57 and our internal discussions about providing some kind of tauri interface like:

$ tauri audit

Which would dump everything known about the system - then I think we'd have a nice robust turn-key system that provides elegant solutions to helping developers stay safe in the semi-hostile environment of thousands of node modules and hundreds of crates and a variety of runtimes.

Cannot download blob:http://file

When trying to download a Eile from a tauri app I was shown a dialog by macOS that it doesn't know how to open blob:http:file

See also:

iotaledger/spark-wallet#89 (comment)

(includes screenshot)

To Reproduce
Steps to reproduce the behavior:

  1. Install iota-ledger/spark-wallet
  2. Launch the app once built, and choose backup seedvault
  3. Choose Password and attempt to download
  4. See error

Expected behavior
The file should just download

Platform (please complete the following information):
OS: macOS
Node: 13.1.0
NPM: 6.12.1
Yarn: 1.21.1
Tauri Binding: ?
Bundle Target: ?

Rust 1.40.0

Github Actions Checks API

Is your feature request related to a problem? Please describe.
It would be brilliant to have access to the Checks API in order to figure out what specific build pipelines (eg. MacOS NodeJS) are working on Master. We currently have a "workflow badge" -- but that is all or nothing:
https://img.shields.io/github/workflow/status/tauri-apps/tauri/test%20library?label=test%20library

Here is a bit of a description:
badges/shields#2574 (comment)

https://api.github.com/repos/tauri-apps/tauri/commits/dev/check-runs

Describe the solution you'd like
Considering the API from Github is in beta - it would maybe make sense to setup our own service to produce these checks - perhaps self-hosted. But ideas are welcome!

Describe alternatives you've considered
Wait for someone else to solve it?

Repository Restructuring

Is your feature request related to a problem? Please describe.
This monorepository is not well-thought out, and before we can launch the alpha we need some restructuring.

Describe the solution you'd like
For starters, the bindings and ui library need to go away, they aren't needed.
Then we need to isolate project parts into their constituent areas:

  1. node harness
  2. rust tauri
  3. cargo bundler

Describe alternatives you've considered
I see two approaches:

  1. Keep the monorepo (my preference)
  2. Split them out into three repos.

Talking with @tensor-programming we feel that this will be important for stability and process. Further, this is related to #43 and a prerequisite.

Prepare for Global Installation

Is your feature request related to a problem? Please describe.
Installing Tauri locally in projects is bloaty and annoying.

Describe the solution you'd like

$ npm install --global @tauri-apps/tauri

Additional context
Well, this is more of a "does it work? what do we need to change to make it work?" kind of issue.

EdgeHTML: Cannot execute webview.eval immediately after startup (replaces #190)

OS: Windows

This is a replacement for #190, as after more research the title has become misleading and the issue is becoming clearer.

EdgeHTML is currently bugged: webview.eval() may fail silently when executed in a closure dispatched during startup. Related issue on webview.

Show Case
use web_view::*

fn main() {
    let webview = web_view::builder()
        .title("Timer example")
        .content(Content::Html(HTML))
        .size(800, 600)
        .resizable(true)
        .debug(true)
        .user_data(0)
        .invoke_handler(|_webview, _arg| Ok(()))
        .build()
        .unwrap();

    // to showcase the bug, we try to add multiple items to the page.
    // only some will show. If your computer is too performant, maybe none
    // if that happens make the for loop bigger.

    let handle = webview.handle();
    for i in 0..1000 {
        handle.dispatch(move |webview| {
            webview.eval(&format!("document.body.appendChild(document.createElement('p')).appendChild(document.createTextNode('Item {}'))", i))
        }).unwrap();
    }
    webview.run().unwrap();
}

const HTML: &str = r#"
<!doctype html>
<html>
    <body>
        <h1>Hello World!</h1>
    </body>
</html>
"#;

MSHTML works, but we must wait for an event loop iteration by using webview.step(), or the JS execution will fail and crash the app.
Edit: Update: this issue is now fixed in webview 0.6

Show Case
use web_view::*;

fn main() {
    let webview = web_view::builder()
        .title("Timer example")
        .content(Content::Html(HTML))
        .size(800, 600)
        .resizable(true)
        .debug(true)
        .user_data(0)
        .invoke_handler(|webview, arg| {
            match arg {
                "test" => webview.eval("test()")?,
                _ => unimplemented!()
            };
            Ok(())
        })
        .build()
        .unwrap();
        
    webview.handle().dispatch(|webview| {
        // we must wait one itteration of the even loop before executing js.
        webview.step().unwrap();
        webview.eval("test()")
    }).unwrap();

    webview.run().unwrap();
}

const HTML: &str = r#"
<!doctype html>
<html>
    <body>
        <h1>Hello World!</h1>
        <button onclick="external.invoke('test')">test</button>
    </body>
    <script>
        function test () {
            alert('Hi there!')
        }
    </script>
</html>
"#;

The new webview rewrite adds an init method that will solve these problems, but there is no ETA.

The relevant code in tauri is here

I've only been able to test this on my machine, so others could have different experiences.

Actually use security framework

Describe the solution you'd like
It'd be nice to actually apply the security framework when building.

Describe alternatives you've considered
Ignoring security problems won't help.

[Bug] Windows 10 Command Line opens with Production Apps

Describe the bug
Production windows binaries open up a terminal window while they are running.

To Reproduce
Steps to reproduce the behavior:

  1. Build a Tauri app on windows.
  2. Run the Executable
  3. See error

Expected behavior
The terminal window should not open for a production application.

Screenshots
win-bug

Platform (please complete the following information):
OS: Windows 10
Tauri Binding: Latest Dev
Bundle Target: Windows 10 edge & mshtml

Additional context
Bug results also when building with Webview alone.

Issue on webview: Boscop/web-view#111 (comment)

Does the WebView runtime use js?

What I want to know is that if you use webview , it's actually a browser, just a smaller shell (compared with electron'), then I'll build a html file + js file for interaction (rust' interface).

Or rs to build the logical layer

Chestnut

<html>
<body>
<button id="btn"> </button>
</body>
</html>
document. getByElementById ('btn'). onClick ('alert ('xx'))

Is that so? So rust just means that interfaces like operating file systems are provided at the bottom?

bundler hates projects not named "app"

Describe the bug
If you name your project something other than "app" in src-tauri/Cargo.toml, the build fails.

To Reproduce
Steps to reproduce the behavior:

  1. Init a project.
  2. edit src-tauri/Cargo.toml:
[package]
name = "QuasarDemo"
  1. Finish the build, get this error:
Finished release [optimized] target(s) in 4m 19s
    Bundling QuasarDemo.app
error: Failed to copy binary from "/[redacted]/tauri/examples/quasar-app/src-tauri/target/release/QuasarDemo"
  Caused by: "/[redacted]/tauri/examples/quasar-app/src-tauri/target/release/QuasarDemo" does not exist

Expected behavior
The app should be built.

Platform (please complete the following information):
This is probably happening for all platforms.

GitHub Actions for Builds

Is your feature request related to a problem? Please describe.
We need some build pipelines.

Describe the solution you'd like
Have a discussion about using github actions

Icon Generation

In the past we were using the quasar framework's icon factory (I'm the author of that lib). Thankfully its written such that it can be imported for module purposes, unfortunately I no longer have write access to that org. I think the best would be to make a tiny - tauri-focussed version of that repo and include it in this monorepo.

Tray app

Describe the solution you'd like

An easy API to create a tray icon in the current os. So you can "minimize to tray", or even have the app be exclusively a tray app with a menu and no window. The right-click menu should be customizable and allow for common features like dividers and such (maybe checkboxes? maybe custom icons?).

macOS: objc_msgSend has a new prototype

Describe the bug
I'm not entirely sure which version of Xcode or macOS this was changed in, but it appears that the method signature for objc_msgSend has changed so that it must be casted to the appropriate function prototype. Attempting to compile a Tauri app for macOS with cargo build --features embedded-server --release gives the following error:

Log output
src-tauri git:(master) โœ— cargo build --features embedded-server --release
   Compiling libc v0.2.65
   Compiling cfg-if v0.1.10
   Compiling autocfg v0.1.7
   Compiling proc-macro2 v1.0.6
   Compiling unicode-xid v0.2.0
   Compiling syn v1.0.8
   Compiling serde v1.0.103
   Compiling cc v1.0.47
   Compiling semver-parser v0.7.0
   Compiling lazy_static v1.4.0
   Compiling log v0.4.8
   Compiling byteorder v1.3.2
   Compiling futures v0.1.29
   Compiling either v1.5.3
   Compiling rand_core v0.4.2
   Compiling scopeguard v1.0.0
   Compiling bitflags v1.2.1
   Compiling fnv v1.0.6
   Compiling ryu v1.0.2
   Compiling version_check v0.1.5
   Compiling smallvec v1.0.0
   Compiling matches v0.1.8
   Compiling maybe-uninit v2.0.0
   Compiling crc32fast v1.2.0
   Compiling slab v0.4.2
   Compiling getrandom v0.1.13
   Compiling memchr v2.2.1
   Compiling version_check v0.9.1
   Compiling itoa v0.4.4
   Compiling core-foundation-sys v0.6.2
   Compiling same-file v1.0.5
   Compiling pkg-config v0.3.17
   Compiling ppv-lite86 v0.2.6
   Compiling rustc-demangle v0.1.16
   Compiling percent-encoding v1.0.1
   Compiling httparse v1.3.4
   Compiling regex-syntax v0.6.12
   Compiling siphasher v0.2.3
   Compiling remove_dir_all v0.5.2
   Compiling adler32 v1.0.4
   Compiling failure_derive v0.1.6
   Compiling pulldown-cmark v0.2.0
   Compiling rayon-core v1.6.1
   Compiling percent-encoding v2.1.0
   Compiling native-tls v0.2.3
   Compiling try-lock v0.2.2
   Compiling doc-comment v0.3.1
   Compiling glob v0.2.11
   Compiling encoding_rs v0.8.20
   Compiling mime v0.3.14
   Compiling bytecount v0.4.0
   Compiling sysinfo v0.9.6
   Compiling dtoa v0.4.4
   Compiling urlencoding v1.0.0
   Compiling boxfnonce v0.1.1
   Compiling safemem v0.3.3
   Compiling unicode-width v0.1.6
   Compiling ansi_term v0.11.0
   Compiling vec_map v0.8.1
   Compiling ascii v0.8.7
   Compiling language-tags v0.2.2
   Compiling podio v0.1.6
   Compiling chunked_transfer v0.3.1
   Compiling yaml-rust v0.3.5
   Compiling strsim v0.8.0
   Compiling webbrowser v0.5.2
   Compiling unwrap v1.2.1
   Compiling try_from v0.3.2
   Compiling crossbeam-utils v0.6.6
   Compiling thread_local v0.3.6
   Compiling lock_api v0.3.2
   Compiling rand_core v0.3.1
   Compiling crossbeam-utils v0.7.0
   Compiling rand_pcg v0.1.2
   Compiling rand_chacha v0.1.1
   Compiling crossbeam-epoch v0.8.0
   Compiling rand v0.6.5
   Compiling indexmap v1.3.0
   Compiling num-traits v0.2.10
   Compiling num-integer v0.1.41
   Compiling unicode-bidi v0.3.4
   Compiling unicode-normalization v0.1.11
   Compiling walkdir v2.2.9
   Compiling error-chain v0.12.1
   Compiling unicase v2.6.0
   Compiling c2-chacha v0.2.3
   Compiling phf_shared v0.7.24
   Compiling miniz_oxide v0.3.5
   Compiling tokio-sync v0.1.7
   Compiling textwrap v0.11.0
   Compiling backtrace-sys v0.1.32
   Compiling bzip2-sys v0.1.7
   Compiling webview-sys v0.3.3
   Compiling tauri-sys v1.0.0 (/Users/rajiv/spark-wallet/node_modules/@tauri-apps/tauri/bindings/rust/tauri-sys)
   Compiling tokio-executor v0.1.8
   Compiling crossbeam-queue v0.1.2
   Compiling crossbeam-channel v0.3.9
   Compiling rand_xorshift v0.1.1
   Compiling rand_hc v0.1.0
   Compiling rand_isaac v0.1.1
   Compiling idna v0.1.5
   Compiling idna v0.2.0
   Compiling phf v0.7.24
   Compiling want v0.2.0
   Compiling tokio-current-thread v0.1.6
   Compiling tokio-timer v0.2.11
error: failed to run custom build command for `tauri-sys v1.0.0 (/Users/rajiv/spark-wallet/node_modules/@tauri-apps/tauri/bindings/rust/tauri-sys)`

Caused by:
  process didn't exit successfully: `/Users/rajiv/spark-wallet/src-tauri/target/release/build/tauri-sys-33b515d64985e33c/build-script-build` (exit code: 1)
--- stdout
cargo:rustc-link-lib=framework=Cocoa
cargo:rustc-link-lib=framework=WebKit
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("z")
HOST = Some("x86_64-apple-darwin")
CC_x86_64-apple-darwin = None
CC_x86_64_apple_darwin = None
HOST_CC = None
CC = None
CFLAGS_x86_64-apple-darwin = None
CFLAGS_x86_64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2,sse3,ssse3")
CC_x86_64-apple-darwin = None
CC_x86_64_apple_darwin = None
HOST_CC = None
CC = None
CFLAGS_x86_64-apple-darwin = None
CFLAGS_x86_64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2,sse3,ssse3")
CC_x86_64-apple-darwin = None
CC_x86_64_apple_darwin = None
HOST_CC = None
CC = None
CFLAGS_x86_64-apple-darwin = None
CFLAGS_x86_64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2,sse3,ssse3")
running: "cc" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "../../../ui" "-Wall" "-Wextra" "-x" "objective-c" "-std=c11" "-w" "-DDEBUG" "-DWEBVIEW_COCOA" "-o" "/Users/rajiv/spark-wallet/src-tauri/target/release/build/tauri-sys-b892175d038f48b9/out/../../../ui/tauri-cocoa.o" "-c" "../../../ui/tauri-cocoa.m"
cargo:warning=../../../ui/tauri-cocoa.m:27:43: error: expected ')'
cargo:warning=  return ((void (*)(id, SEL, const char *)objc_msgSend)((id)objc_getClass("NSString"),
cargo:warning=                                          ^
cargo:warning=../../../ui/tauri-cocoa.m:27:11: note: to match this '('
cargo:warning=  return ((void (*)(id, SEL, const char *)objc_msgSend)((id)objc_getClass("NSString"),
cargo:warning=          ^
cargo:warning=../../../ui/tauri-cocoa.m:28:72: error: expected ')'
cargo:warning=                      sel_registerName("stringWithUTF8String:"), c_str);
cargo:warning=                                                                       ^
cargo:warning=../../../ui/tauri-cocoa.m:27:10: note: to match this '('
cargo:warning=  return ((void (*)(id, SEL, const char *)objc_msgSend)((id)objc_getClass("NSString"),
cargo:warning=         ^
cargo:warning=../../../ui/tauri-cocoa.m:33:25: error: expected ')'
cargo:warning=      (void (*)(id, SEL)objc_msgSend)((id)objc_getClass("NSMenuItem"), sel_registerName("alloc"));
cargo:warning=                        ^
cargo:warning=../../../ui/tauri-cocoa.m:33:7: note: to match this '('
cargo:warning=      (void (*)(id, SEL)objc_msgSend)((id)objc_getClass("NSMenuItem"), sel_registerName("alloc"));
cargo:warning=      ^
cargo:warning=../../../ui/tauri-cocoa.m:34:16: error: too many arguments to function call, expected 0, have 5
cargo:warning=  objc_msgSend(item, sel_registerName("initWithTitle:action:keyEquivalent:"),
cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:36:16: error: too many arguments to function call, expected 0, have 2
cargo:warning=  objc_msgSend(item, sel_registerName("autorelease"));
cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:56:45: error: too many arguments to function call, expected 0, have 2
cargo:warning=                               objc_msgSend(message, sel_registerName("body")),
cargo:warning=                               ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:63:31: error: too many arguments to function call, expected 0, have 2
cargo:warning=  id openPanel = objc_msgSend((id)objc_getClass("NSOpenPanel"),
cargo:warning=                 ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:68:20: error: too many arguments to function call, expected 0, have 2
cargo:warning=      objc_msgSend(parameters, sel_registerName("allowsMultipleSelection")));
cargo:warning=      ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:70:16: error: too many arguments to function call, expected 0, have 3
cargo:warning=  objc_msgSend(openPanel, sel_registerName("setCanChooseFiles:"), 1);
cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:74:42: error: too many arguments to function call, expected 0, have 2
cargo:warning=          completionHandler(objc_msgSend(openPanel, sel_registerName("URLs")));
cargo:warning=                            ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:72:7: error: too many arguments to function call, expected 0, have 3
cargo:warning=      openPanel, sel_registerName("beginWithCompletionHandler:"), ^(id result) {
cargo:warning=      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:84:31: error: too many arguments to function call, expected 0, have 2
cargo:warning=  id savePanel = objc_msgSend((id)objc_getClass("NSSavePanel"),
cargo:warning=                 ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:86:16: error: too many arguments to function call, expected 0, have 3
cargo:warning=  objc_msgSend(savePanel, sel_registerName("setCanCreateDirectories:"), 1);
cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:87:16: error: too many arguments to function call, expected 0, have 3
cargo:warning=  objc_msgSend(savePanel, sel_registerName("setNameFieldStringValue:"),
cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:92:42: error: too many arguments to function call, expected 0, have 2
cargo:warning=                   id url = objc_msgSend(savePanel, sel_registerName("URL"));
cargo:warning=                            ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:93:43: error: too many arguments to function call, expected 0, have 2
cargo:warning=                   id path = objc_msgSend(url, sel_registerName("path"));
cargo:warning=                             ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:89:16: error: too many arguments to function call, expected 0, have 3
cargo:warning=  objc_msgSend(savePanel, sel_registerName("beginWithCompletionHandler:"),
cargo:warning=  ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:105:20: error: too many arguments to function call, expected 0, have 2
cargo:warning=      objc_msgSend((id)objc_getClass("NSAlert"), sel_registerName("new"));
cargo:warning=      ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=../../../ui/tauri-cocoa.m:107:29: error: too many arguments to function call, expected 0, have 3
cargo:warning=               objc_msgSend((id)objc_getClass("NSImage"),
cargo:warning=               ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:62:1: note: 'objc_msgSend' declared here
cargo:warning=OBJC_EXPORT void
cargo:warning=^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:236:25: note: expanded from macro 'OBJC_EXPORT'
cargo:warning=#   define OBJC_EXPORT  OBJC_EXTERN OBJC_VISIBLE
cargo:warning=                        ^
cargo:warning=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-api.h:225:28: note: expanded from macro 'OBJC_EXTERN'
cargo:warning=#       define OBJC_EXTERN extern
cargo:warning=                           ^
cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
cargo:warning=20 errors generated.
exit code: 1

--- stderr


error occurred: Command "cc" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "../../../ui" "-Wall" "-Wextra" "-x" "objective-c" "-std=c11" "-w" "-DDEBUG" "-DWEBVIEW_COCOA" "-o" "/Users/rajiv/spark-wallet/src-tauri/target/release/build/tauri-sys-b892175d038f48b9/out/../../../ui/tauri-cocoa.o" "-c" "../../../ui/tauri-cocoa.m" with args "cc" did not execute successfully (status code exit code: 1).



warning: build failed, waiting for other jobs to finish...
error: build failed

To Reproduce
Steps to reproduce the behavior:

  1. Clone a Tauri project
  2. cd src-tauri
  3. cargo build --features embedded-server --release

Expected behavior
Project builds without errors

Platform (please complete the following information):
OS: macOS 10.15.2 Beta (19C46a)
Node: v12.13.1
NPM: v6.13.1
Yarn: v1.19.2
Tauri Binding: Rust
Bundle Target: x86_64-apple-darwin

Additional context
https://www.mikeash.com/pyblog/objc_msgsends-new-prototype.html
https://indiestack.com/2019/10/casting-objective-c-message-sends/

Desktop notifications

Describe the solution you'd like

An easy API to interact with whatever the current OS's desktop notifications system is.

Describe alternatives you've considered

Manually launching a new window disguised to look like a desktop notification (not worth the effort)

webview.eval does not work on EDGE and IE

Platform: Windows 10

Description: webview.eval does not work as expected. We use this to inject tauri.js into our applications during development.

When using Edge (configure tauri.edge.active: true in tauri.config.js), execution fails silently.
When using IE (configure tauri.edge.active: false in tauri.config.js), rust panics:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: JsEvaluation', src\libcore\result.rs:1165:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Ideally rust should execute tauri.js, making window.tauri available in the js part of the application.

The relevant file in tauri is runner.js

Note: the rust bindings should throw an error if eval fails (as they do when using IE).
The relevant code is here. No detailed information is thrown.

I've tried executing simple js code instead of tauri.js
I would expect the following snippet to turn the background red:

_webview.eval("document.body.style.background = 'red';")

Instead nothing happens. I'm told this snippet does work on other platforms.

I've been able to verify that rust does load the tauri.js file correcly, by using:

// this prints the tauri.js file to console as expected.
println!("{}", include_str!(concat!(env!("TAURI_DIR"), "/tauri.js")));

Note: last night I managed to get simple js code to add nodes to the DOM, but could not get that working again today. The computer I did this on also runs Windows 10

I've confirmed the bug when using both the quasar example and a new Vue Cli 3 project.
Adding tauri.js to a statics folder and then referencing it in a script tag works as expected.

Steps to reproduce the behavior:
Clone tauri-apps/tauri

cd tauri/cli/tauri.js
yarn
cd ../../examples/vue/quasar-app
yarn
quasar dev
yarn tauri:source:dev

My tauri.conf.js:

const path = require('path')
const distDir = path.resolve(__dirname, './dist/spa')

module.exports = function () {
  return {
    build: {
      distDir: distDir,
      devPath: 'http://localhost:7334' // devServer URL or html dir
    },
    ctx: {},
    tauri: {
      embeddedServer: {
        active: false
      },
      bundle: {
        active: true
      },
      whitelist: {
        all: true
      },
      window: {
        title: 'Tauri App'
      },
      security: {
        csp: 'default-src data: filesystem: ws: http: https: \'unsafe-eval\' \'unsafe-inline\''
      },
      edge: {
        active: true // change this to false to have rust throw an error.
      }
    }
  }
}

OS: Windows 10
Node: v12.13.1
NPM: 6.12.1
Yarn: 1.19.2
Tauri Binding: latest (compiled from source)
Bundle Target: Windows

Possible solutions/workarounds: should we injecty tauri.js using the webpack loader?
Another posibility: adding tauri.js in a script tag dynamically (currenlyt we just execute it) might behave diferently. I've not gotten this to work.

creating property on toml not working in dev or build

Describe the bug

$ RUST_BACKTRACE=1 node node_modules/tauri/bin/tauri build
[tauri]: running build
(node:14442) UnhandledPromiseRejectionWarning: TypeError: Cannot create property 'features' on string '0.1.0'
    at Runner.__whitelistApi (/[redacted]/tauri-latest/cli/tauri.js/runner.js:191:48)
    at __manipulateToml.toml (/[redacted]/tauri-latest/cli/tauri.js/runner.js:86:12)

To Reproduce
Steps to reproduce the behavior:

  1. Go to examples/vanillajs/monolith
  2. Run the command as above.

Platform (please complete the following information):
OS: Mac

My hunch is that this has something to do with the rust workspace configuration.

Reevaluate updater.rs

Describe the bug
I noticed that the updater.rs seems to be a bad actor - and maybe its just on MacOS, but we really need to look into it and get it back in shape. In order to complete a build I needed to remove that bin (see below).

This is obviously only a stopgap fix - we need to address the underlying issue.

To Fix
remove this:

[[bin]]
name = "updater"
path = "src/updater.rs"

from your src-tauri/Cargo.toml file.

lazy loaded images don't load

Describe the bug
Images loaded lazily do not load in Tauri. For example, the Gatsby-image component will lazy load images, and below the fold images do not load.

To Reproduce
Steps to reproduce the behavior:
Can be seen in the gatsby based smoke test. Download the artifacts and click around.

Expected behavior
Images load.

Platform (please complete the following information):
OS: all
Node: all

Keep everything up to date

Is your feature request related to a problem? Please describe.
It would be nice to have the base tauri command check its version, check rust, check the cargo-tauri-bundle and offer to update things.

Describe the solution you'd like

$ tauri dev --autoupdate

This would be the command to automatically update tauri itself, rust, rustup, cargo and cargo-tauri-bundle.

Describe alternatives you've considered
Doing it manually sux.

Testing for the actions.

I am adding tests for the node.js components so we can add them to the github actions. Also I am trying to track down the weird exit code 1 that happens on successful builds. Will close this issue when I've found that exit error.

Frameless window

Describe the solution you'd like
An option to spawn a window without a frame or "chrome" border/title bar/window controls (min/max/restore/close), requiring the app to supply it's own window controls

Additional context

borderlessresizablewithchild

Parse entry point of index.html and rewrite JS for serverless injection

Is your feature request related to a problem? Please describe.
The problem is that different frameworks use different strategies for JS injection in the root app. In the serverless distribution type, we need to do some slight transformation to the JS in order to properly inject it.

Describe the solution you'd like
At build time (not dev because that is really served via webpack) we need to parse the source of the index.html for JS and transform the JS for injection. On a sidenote, this is also where we can inject the CSP meta value.

Describe alternatives you've considered
There are a couple of alternatives:

  1. Write a type of app extension for every framework. This might be a stopgap solution if we can't get DOM / AST parsing to work the way we need it to. It would probably entail handcrafting the tauri entry index.html file, and it strikes me as the most brittle and error-prone.
  2. Whitelist types of frameworks - which defeats the notion of being agnostic in serverless, which is really the claim to fame.

Additional context
In an earlier iteration I hand-crafted the entry file and totally ignored the index.html file that was shipping. Here is the example:

#[cfg(feature = "serverless")]
    {
      fn inline_style(s: &str) -> String {
        format!(r#"<style type="text/css">{}</style>"#, s)
      }

      fn inline_script(s: &str) -> String {
        format!(r#"<script type="text/javascript">{}</script>"#, s)
      }
      let html = format!(r#"<!DOCTYPE html><html><head><meta http-equiv="Content-Security-Policy" content="default-src data: filesystem: 'unsafe-eval' 'unsafe-inline'">{styles}</head><body><div id="q-app"></div>{scripts}</body></html>"#,
    styles = inline_style(include_str!("../target/compiled-web/css/app.css")),
    scripts = inline_script(include_str!("../target/compiled-web/js/app.js")),
  );
      content = tauri_ui::Content::Html(html);
    }
let webview = tauri_ui::builder()
  .title("Tauri POC")
  .size(800, 600)
  .resizable(true)
  .debug(debug)
  .content(content)

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Async Executor

Opening this thread to start the discussion for a custom Async Executor for Tauri.

Why Async?

For Tauri, async means being able to continue core operations while user operations are still pending. This is a large boon to responsiveness in programs that have heavier background tasks.

Why not Tokio or AsyncStd?

Two main reasons: bloat and tailoring. Both runtimes are fairly liberal in how much they import, which is both heavy and a potential security issue. Additionally, we can fine-tune our executor to do only what we need, how we need it.

What do we need to do to get started?

First a few questions:
Q: What common tasks (ie Networking, any thread::spawn(||loop {...})s) will Tauri want to use threads to drive?
Q: What needs to be adjusted, internally and externally, to allow user code to propagate into our executor? Where should the executor sit in our design?

Once these questions are answered, we can start designing the executor. It can be broken up into the following design segments:

  1. Relationship between the executor and the rest of the Tauri framework.
  2. Design of the reactors (one general purpose and a variable number of specialized ones) and how they get work.
  3. How the executor schedules work for the reactors.

top-level Cargo.toml breaks bundler

Describe the bug
If you have a Cargo.toml file above the /src-tauri folder, then bundler fails to copy to the right place.

Expected behavior
The bundler should find the right folder and not bail.

Screenshots

Compiling tauri v1.0.0 (/[redacted]/ui/node_modules/@tauri-apps/tauri/lib/rust)
   Compiling app v0.1.0 (/[redacted]/ui/src-tauri)
    Finished release [optimized] target(s) in 21.01s
    Bundling app.app
error: Failed to copy binary from "/[redacted]/target/release/app"
  Caused by: "/[redacted]/target/release/app" does not exist
  copy_binary_to_bundle(&bundle_directory, settings)
    .chain_err(|| format!("Failed to copy binary from {:?}", settings.binary_path()))?;
let mut path = project_root_dir.join("target");

Platform (please complete the following information):
OS: MacOS, but probably all.

tauri.js CLI: Errors from the Rust CLI don't propagate up to the JS CLI

Describe the bug
It seems like errors reported by the Rust CLI do not propagate to the JS CLI. In other words, the Rust CLI exits with a non-zero exit code, yet the JS CLI does not. Since the JS CLI returns an exit code of 0, the command is considered to have passed. This poses a problem for our own smoke tests in particular -- in the event that this occurs, GitHub Actions will mark the step as "passed" even though it actually should fail.

Examples where this has occurred:
https://github.com/tauri-apps/tauri/pull/187/checks?check_run_id=357905199#step:11:112
https://github.com/tauri-apps/tauri/pull/214/checks?check_run_id=363576771#step:14:130

To Reproduce
Steps to reproduce the behavior:

  1. Run a command from the JS CLI (e.g. yarn tauri build) which causes an error to be thrown from the Rust CLI

Expected behavior
Non-zero error codes from the Rust CLI should result in a non-zero error code from the JS CLI

Platform (please complete the following information):
This doesn't appear to be a platform-specific issue

Tauri init fails to run

Describe the bug
Running tauri init crashes with no result.

To Reproduce
Steps to reproduce the behavior:

  1. Run tauri init

Expected behavior
Bootsrapped src-tauri and tauri.conf.js.

Screenshots
Screenshot

Platform (please complete the following information):
OS: Windows 10 Build 19025.1052
Node: v12.13.1
NPM: 6.12.1
Yarn: 1.19.1
Tauri Binding: I guess latest
Bundle Target: I guess latest

Additional context
It crashes in file template.js here:

const tomlPath = join(__dirname, '../../tauri/Cargo.toml')
const tomlFile = readFileSync(tomlPath)

join goes to path were npm stores symlinks to bin files
so i tried to clone repo with Cargo.toml and that failed because of tauri symlink (or hardlink)
i deleted that, cloned tauri, moved folder with Cargo.toml
and init worked without failures
but src-tauri wasn't created, only tauri.conf.js

Tauri CLI does not handle promise rejections

Currently, tauri.js cli does not handle promise rejections properly.
This can be seen if for example one attempts to run tauri build while build assets are not present.
The command line will display the error, but as it is an unhandled promise rejection, the cli exits with a zero exit code. This could become a problem in the future, if we test the cli exit code.

Fixing this behavior requires multiple changes, and could be approached two ways:
Either we wrap all await expressions with try {} catch (e) {}, or we have a single try {} catch (e) {} at the root of the cli. I prefer this second approach.

Using this second approach will require refactor in multiple places. I believe a typescript version of the cli is in the works, so maybe we could wait for that to be done before tackling this problem.

To Reproduce
Steps to reproduce the behavior:
run tauri build while the assets (index.html) are not available.

Explanation of JS's behavior

Short version: await all promises

Long version

There are many gotchas to async js and error handling. Here is a simple showcase of some of the gotchas of async JS.

entry() // execute the entry function
async function entry () {
  try {
    a() // we are not awaiting this promise. mistake.
    b() // this function is the same as a. Async functions return promises
    await c() // this function does not await the promises inside
    await d() // this one finally does work as intended
  } catch (err) {
    // this will only catch d
    console.error('caught error', err)
  }
}
async function a () {
  throw new Error('Catch this!')
}
function b () {
  return new Promise((resolve, reject) => {
    reject(new Error('Catch that!'))
  })
}
async function c () {
  return a() // we should be awaiting this
}
async function d () {
  return await b() // finally the right signature!
}

Changes that must be made

  1. Catch and handle all errors at cli root
  2. All promises must be awaited.

I've not been able to come up with jest tests for this

Icon on windows

Is your feature request related to a problem? Please describe.
The icon in the webview frame of the built app in windows looks terrible.

Describe the solution you'd like
https://github.com/mxre/winres

We are shipping the .ico file - I'm not sure why it isn't working...

WEB API

Describe the bug
The WEB API does not work, even on external sites served over HTTPS.

Expected behavior
In 'secure' contexts such as file://, https:// and localhost, we would expect that the web api would be available.

Platform:
All

Additional context
This is more to do with the web-view library - and probably webviews themselves, but it is a major concern that we need to resolve - or consider building a shimming API that offloads these tasks to the underlying OS.

Thanks to @rihardsgravis for raising the issue.

Tracking : accessibility (a11y)

Hi, pretty new here, but as a discussion where ongoing on the project Discord, doing a tracking issue for this seemed like a good idea (Disclaimer : I'm not an accessibility expert at all, let alone a Tauri one, so suggestions are highly encouraged)

Accessibility is something very important, it allows people with vision problems and movement difficulties to use our application.

Electron cover this issue by using Chromium, that since it's a fully featured web browser, already have accessibility feature built-in.

Tauri, on the other side, use many system independent webviews, we must make sure to exploit all their built-in accessibility features, and if possible.

While Tauri can't force everyone into doing accessible application, we must make sure that many point are covered by it :

  • Make sure screen readers have access to the website content. Aka being able to read it like a website.
  • Make sure others inputs aren't overridden by Tauri, like arrows, tabs, shift + tabs, so navigation on websites can be possible.

make API a generic TS lib for both node and deno to consume

Is your feature request related to a problem? Please describe.
We plan on making a DENO CLI, and to that end (and to reduce code repetition) we would like to turn the current node.js API into a standalone library for consumption in either NODE or DENO.

Describe alternatives you've considered

  • an API lib for each context - but that makes things more complex
  • a complete DENO solution, which also makes things tricky

Additional context
@nklayman offered to work on the TS transition, and @rsp offered to help if possible.

Spawning and managing subwindows

Is your feature request related to a problem? Please describe.
A subwindow management interface would be very helpful.

Describe the solution you'd like
RFC forthcoming

Describe alternatives you've considered
Dragging panes within a window is nice, but it won't take up the realestate of multi-monitor setups, for example.

Additional context
Forthcoming

Update src-tauri

Is your feature request related to a problem? Please describe.
We currently don't have a way to update src-tauri other than rerunning tauri init. While doing it again might be ok, it might overwrite important files and is semantically wrong...

Describe the solution you'd like
tauri update project or something like that, which is an interactive shell for updating your stuff. With merging options, failsafe and some kind of automated check to validate that everything is still ok.

integrated dev server

@lucasfernog and I talked about this, and we see two options for the integrated devserver for html/js/css assets:

  1. Use our tiny_http server that we ship in bundles that use the cloud* pattern
  2. Construct a webpack-dev-server with babel for transpilation

This is needed when people don't use the devserver from their front-end framework. The positive part about using webpack is that we can then reuse some of the logic for running our specific dechunking / anti-dynamic imports etc.

Rust config parsing broken

Describe the bug

  16: tauri::config::get
             at /[redacted]/.cargo/registry/src/github.com-1ecc6299db9ec823/tauri-0.1.1/src/config.rs:77
  17: tauri::app::runner::run
             at /[redacted]/.cargo/registry/src/github.com-1ecc6299db9ec823/tauri-0.1.1/src/app/runner.rs:11
  18: tauri::app::App::run
             at /[redacted]/.cargo/registry/src/github.com-1ecc6299db9ec823/tauri-0.1.1/src/app.rs:12

I published a new version based on the work at feature/env - but that does not resolve this issue.

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.