A custom invoke system for Tauri that leverages a localhost server

Overview

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 XMLHttpRequest and the server is responsible for replying to it.

Usage

First, add the dependency to your src-tauri/Cargo.toml file:

[dependencies]
tauri-invoke-http = { git = "https://github.com/tauri-apps/tauri-invoke-http", branch = "dev" }

Then, setup the HTTP invoke system on the main.rs file:

fn main() {
  // initialize the custom invoke system as a HTTP server, allowing the given origins to access it.
  let http = tauri_invoke_http::Invoke::new(["tauri://localhost", "http://localhost:8080"]);
  tauri::Builder::default()
    .invoke_system(http.initialization_script(), http.responder())
    .setup(move |app| {
      http.start(app.handle());
      Ok(())
    })
    .run(tauri::generate_context!())
    .expect("error while running tauri application")
}
Comments
  • Removed custom-protocol feature but tauri://localhost is still used

    Removed custom-protocol feature but tauri://localhost is still used

    Context

    I recently opened this discussion. It sounded like this could fix my issues, since in my case I want the requests to have as Origin http://localhost.

    What I tried

    In my Cargo.toml, I removed the custom-protocol from the default features.

    Before:

    [features]
    default = [ "custom-protocol" ]
    custom-protocol = [ "tauri/custom-protocol" ]
    

    After:

    [features]
    default = [ ]
    custom-protocol = [ "tauri/custom-protocol" ]
    

    And I have included the dependency as follows (also tried with branch release):

    [dependencies]
    tauri-invoke-http = { git = "https://github.com/tauri-apps/tauri-invoke-http", branch = "dev" }
    

    But when I run npm run tauri build, the requests still have tauri://localhost as their Origin. Am I doing something wrong? Do I need to build with a specific flag?

    opened by elanzini 2
  • fix(deps): update rust crate tiny_http to 0.11

    fix(deps): update rust crate tiny_http to 0.11

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | tiny_http | dependencies | minor | 0.9 -> 0.11 |


    Release Notes

    tiny-http/tiny-http

    v0.11.0

    Compare Source

    • Add support for Rustls

      Thanks to @​3xmblzj5 and @​travispaul for their help in implementing Rustls as a drop-in replacement for OpenSSL, you can now build tiny-http with TLS support without any external dependencies! OpenSSL will remain the default implementation if you just enable the ssl feature, but you are strongly encouraged to use ssl-rustls where possible!

    • Fix incorrect certificate chain loading

      Fix a longstanding bug where we were only loading the first (i.e. the leaf) certificate from any PEM file supplied by the user.

    v0.10.0

    Compare Source

    • Replace chrono with time-rs

      chrono was only used to store and format DateTime into the slightly odd format required by RFC 7231, so to avoid the numerous RUSTSEC advisories generated by the localtime_r issue, we can just drop it entirely and switch to time-rs. Unfortunately this means we need to bump our minimum tested compiler version to 1.51, and as such this change requires a full minor release.


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • fix(deps): update rust crate tauri to 1.0

    fix(deps): update rust crate tauri to 1.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | tauri (source) | dependencies | patch | 1.0.0-rc.3 -> 1.0.2 |


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Configure Renovate

    Configure Renovate

    Mend Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • Cargo.toml (cargo)
    • .github/workflows/audit.yml (github-actions)
    • .github/workflows/covector-status.yml (github-actions)
    • .github/workflows/covector-version-or-publish.yml (github-actions)
    • .github/workflows/format.yml (github-actions)
    • .github/workflows/lint.yml (github-actions)
    • .github/workflows/test.yml (github-actions)

    Configuration

    πŸ”‘ Renovate has detected a custom config for this PR. Feel free to ask for help if you have any doubts and would like it reviewed.

    Important: Now that this branch is edited, Renovate can't rebase it from the base branch any more. If you make changes to the base branch that could impact this onboarding PR, please merge them manually.

    What to Expect

    With your current configuration, Renovate will create 7 Pull Requests:

    chore(deps): update tauri-apps/create-pull-request action to v2.8.1
    fix(deps): update rust crate tauri to 1.0.2
    • Schedule: ["at any time"]
    • Branch name: renovate/tauri-monorepo
    • Merge into: dev
    • Upgrade tauri to 1.0.2
    fix(deps): update rust crate tiny_http to 0.11
    • Schedule: ["at any time"]
    • Branch name: renovate/tiny_http-0.x
    • Merge into: dev
    • Upgrade tiny_http to 0.11
    chore(deps): update actions/cache action to v3
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-cache-3.x
    • Merge into: dev
    • Upgrade actions/cache to v3
    chore(deps): update actions/checkout action to v3
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-checkout-3.x
    • Merge into: dev
    • Upgrade actions/checkout to v3
    chore(deps): update actions/setup-node action to v3
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-setup-node-3.x
    • Merge into: dev
    • Upgrade actions/setup-node to v3
    chore(deps): update tauri-apps/create-pull-request action to v3

    🚸 Branch creation will be limited to maximum 2 per hour, so it doesn't swamp any CI resources or spam the project. See docs for prhourlylimit for details.


    ❓ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • fix(deps): update rust crate tiny_http to 0.12

    fix(deps): update rust crate tiny_http to 0.12

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | tiny_http | dependencies | minor | 0.11 -> 0.12 |


    Release Notes

    tiny-http/tiny-http

    v0.12.0

    Compare Source

    • Bumped the minimum compiler version tested by CI to 1.56 - this is necessary due to an increasing number of dependencies introducing Cargo manifest features only supported on newer versions of Rust.

    • Add support for UNIX sockets

      Thanks to @​ColonelThirtyTwo for adding support for binding to UNIX sockets when creating a tiny-http server. This change makes a few small breaking API modifications, if you are constructing ServerConfig manually you will need to use the new ListenAddr type rather than directly supplying a net::SocketAddr. Likewise Server::server_addr() will now return an enum that can represent either a TCP socket or a UNIX socket.

      Finally Request::remote_addr() now returns an Option<&SocketAddr> as UNIX sockets don't ever have a remote host.

    • Reduce required dependencies by switching to httpdate

      @​esheppa replaced our internal HTTPDate type with the httpdate library (used extensively in the community by Hyper, Tokio and others) which reduces our baseline dependency tree from 18 crates to 5!

    • TestRequest::path no longer has a 'static bound, allowing for fuzzers to generate test request paths at runtime.

    • Unpinned zeroize so it can float around any stable ^1 version.


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • fix(deps): update rust crate tauri to 1.2

    fix(deps): update rust crate tauri to 1.2

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | tauri (source) | dependencies | minor | 1.0 -> 1.2 |


    Release Notes

    tauri-apps/tauri

    v1.2.0: tauri v1.2.0

    Compare Source

    Updating crates.io index

    Cargo Audit

    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
          Loaded 469 security advisories (from /home/runner/.cargo/advisory-db)
        Updating crates.io index
        Scanning Cargo.lock for vulnerabilities (453 crate dependencies)
    Crate:     xml-rs
    Version:   0.8.4
    Warning:   unmaintained
    Title:     xml-rs is Unmaintained
    Date:      2022-01-26
    ID:        RUSTSEC-2022-0048
    URL:       https://rustsec.org/advisories/RUSTSEC-2022-0048
    Dependency tree:
    xml-rs 0.8.4
    └── plist 1.3.1
        └── tauri-codegen 1.2.0
            β”œβ”€β”€ tauri-macros 1.2.0
            β”‚   └── tauri 1.2.0
            β”‚       β”œβ”€β”€ tauri 1.2.0
            β”‚       β”œβ”€β”€ restart 0.1.0
            β”‚       └── app-updater 0.1.0
            └── tauri-build 1.2.0
                └── app-updater 0.1.0
    
    warning: 1 allowed warning found
    

    [1.2.0]

    • Add accept_first_mouse option for macOS windows.
    • Add new app-specific BaseDirectory enum variants AppConfig, AppData, AppLocalData, AppCache and AppLog along with equivalent functions in path module and deprecated ambiguous variants Log and App along with their equivalent functions in path module.
    • Set the correct mimetype when streaming files through asset: protocol
    • Disable automatic window tabbing on macOS when the tabbing_identifier option is not defined, the window is transparent or does not have decorations.
    • The custom protocol now validates the request URI. This has implications when using the asset protocol without the convertFileSrc helper, the URL must now use the asset://localhost/$filePath format.
    • Escape glob special characters in files/directories when dropping files or using the open/save dialogs.
    • Properly emit events with object payload.
    • Fixes access to the WebviewWindow.getByLabel function in a tauri://window-created event listener.
    • Fixes resource reading being always rejected by the scope.
    • Fixes __TAURI_PATTERN__ object freeze.
    • Readd the option to create an unfocused window via the focused method. The focus function has been deprecated.
    • Add hidden_title option for macOS windows.
    • Custom protocol headers are now implemented on Linux when running on webkit2gtk 2.36 or above.
    • Add App::show(), AppHandle::show(), App::hide() and AppHandle::hide() for hiding/showing the entire application on macOS.
    • Fix a deadlock when modifying the menu in the on_menu_event closure.
    • Resolve base system directory in shell scope.
    • Added tabbing_identifier to the window builder on macOS.
    • Add title_bar_style option for macOS windows.
    • Added methods to set the system tray title on macOS.
    • Added the user_agent option when creating a window.

    Cargo Publish

    Updating crates.io index
       Packaging tauri v1.2.0 (/home/runner/work/tauri/tauri/core/tauri)
       Verifying tauri v1.2.0 (/home/runner/work/tauri/tauri/core/tauri)
     Downloading crates ...
      Downloaded siphasher v0.3.10
      Downloaded serde_repr v0.1.9
      Downloaded rand_chacha v0.2.2
      Downloaded serialize-to-javascript-impl v0.1.1
      Downloaded serde_with_macros v1.5.2
      Downloaded socket2 v0.4.7
      Downloaded rand_core v0.6.4
      Downloaded unicode-segmentation v1.10.0
      Downloaded uuid v0.8.2
      Downloaded version-compare v0.0.11
      Downloaded webkit2gtk v0.18.2
      Downloaded xattr v0.2.3
      Downloaded serde_with v1.14.0
      Downloaded proc-macro-crate v1.2.1
      Downloaded version-compare v0.1.0
      Downloaded pango-sys v0.15.10
      Downloaded matches v0.1.9
      Downloaded pango v0.15.10
      Downloaded glib-sys v0.15.10
      Downloaded gio-sys v0.15.10
      Downloaded gio v0.15.12
      Downloaded gdkx11-sys v0.15.1
      Downloaded http-range v0.1.5
      Downloaded phf_codegen v0.8.0
      Downloaded phf_macros v0.8.0
      Downloaded phf v0.10.1
      Downloaded phf_shared v0.8.0
      Downloaded x11 v2.20.0
      Downloaded tauri-runtime-wry v0.12.0
      Downloaded gtk3-macros v0.15.4
      Downloaded tokio-macros v1.8.0
      Downloaded utf-8 v0.7.6
      Downloaded treediff v3.0.2
      Downloaded tendril v0.4.3
      Downloaded tar v0.4.38
      Downloaded walkdir v2.3.2
      Downloaded pest v2.4.1
      Downloaded darling v0.13.4
      Downloaded remove_dir_all v0.5.3
      Downloaded ucd-trie v0.1.5
      Downloaded phf_shared v0.10.0
      Downloaded uuid v1.2.1
      Downloaded semver v0.11.0
      Downloaded infer v0.7.0
      Downloaded tauri-codegen v1.2.0
      Downloaded state v0.5.3
      Downloaded thin-slice v0.1.1
      Downloaded same-file v1.0.6
      Downloaded rand_core v0.5.1
      Downloaded tauri-utils v1.2.0
      Downloaded selectors v0.22.0
      Downloaded tauri-runtime v0.12.0
      Downloaded rustc_version v0.4.0
      Downloaded rand_pcg v0.2.1
      Downloaded cssparser-macros v0.6.0
      Downloaded tauri-macros v1.2.0
      Downloaded slab v0.4.7
      Downloaded flate2 v1.0.24
      Downloaded futures-core v0.3.25
      Downloaded cssparser v0.27.2
      Downloaded futf v0.1.5
      Downloaded tempfile v3.3.0
      Downloaded raw-window-handle v0.5.0
      Downloaded digest v0.10.5
      Downloaded cty v0.2.2
      Downloaded ctor v0.1.26
      Downloaded fastrand v1.8.0
      Downloaded typenum v1.15.0
      Downloaded wry v0.22.0
      Downloaded tao v0.15.0
      Downloaded encoding_rs v0.8.31
      Downloaded brotli v3.3.4
      Downloaded javascriptcore-rs v0.16.0
      Downloaded gtk v0.15.5
      Downloaded cpufeatures v0.2.5
      Downloaded atk-sys v0.15.1
      Downloaded glib-macros v0.15.11
      Downloaded glib v0.15.12
      Downloaded convert_case v0.4.0
      Downloaded rand v0.8.5
      Downloaded rand v0.7.3
      Downloaded png v0.17.7
      Downloaded http v0.2.8
      Downloaded gtk-sys v0.15.3
      Downloaded deflate v0.7.20
      Downloaded system-deps v6.0.3
      Downloaded png v0.11.0
      Downloaded javascriptcore-rs-sys v0.4.0
      Downloaded ignore v0.4.18
      Downloaded gdk v0.15.4
      Downloaded string_cache_codegen v0.5.2
      Downloaded stable_deref_trait v1.2.0
      Downloaded kuchiki v0.8.1
      Downloaded inflate v0.3.4
    

    v1.1.2: tauri v1.1.2

    Compare Source

    Updating crates.io index

    Cargo Audit

    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
          Loaded 469 security advisories (from /home/runner/.cargo/advisory-db)
        Updating crates.io index
        Scanning Cargo.lock for vulnerabilities (450 crate dependencies)
    Crate:     xml-rs
    Version:   0.8.4
    Warning:   unmaintained
    Title:     xml-rs is Unmaintained
    Date:      2022-01-26
    ID:        RUSTSEC-2022-0048
    URL:       https://rustsec.org/advisories/RUSTSEC-2022-0048
    Dependency tree:
    xml-rs 0.8.4
    └── plist 1.3.1
        └── tauri-codegen 1.1.1
            β”œβ”€β”€ tauri-macros 1.1.1
            β”‚   └── tauri 1.1.2
            β”‚       β”œβ”€β”€ tauri 1.1.2
            β”‚       β”œβ”€β”€ restart 0.1.0
            β”‚       └── app-updater 0.1.0
            └── tauri-build 1.1.1
                └── app-updater 0.1.0
    
    warning: 1 allowed warning found
    

    [1.1.2]

    • Escape glob special characters in files/directories when dropping files or using the open/save dialogs.

    Cargo Publish

    Updating crates.io index
       Packaging tauri v1.1.2 (/home/runner/work/tauri/tauri/core/tauri)
       Verifying tauri v1.1.2 (/home/runner/work/tauri/tauri/core/tauri)
     Downloading crates ...
      Downloaded itoa v0.4.8
      Downloaded futures-task v0.3.25
      Downloaded futures-executor v0.3.25
      Downloaded nodrop v0.1.14
      Downloaded precomputed-hash v0.1.1
      Downloaded proc-macro-hack v0.5.19
      Downloaded ppv-lite86 v0.2.17
      Downloaded phf_shared v0.8.0
      Downloaded num-iter v0.1.43
      Downloaded xattr v0.2.3
      Downloaded rand_core v0.5.1
      Downloaded treediff v3.0.2
      Downloaded typenum v1.15.0
      Downloaded serialize-to-javascript v0.1.1
      Downloaded tauri-runtime v0.11.1
      Downloaded selectors v0.22.0
      Downloaded walkdir v2.3.2
      Downloaded x11-dl v2.20.0
      Downloaded filetime v0.2.18
      Downloaded heck v0.3.3
      Downloaded num-traits v0.2.15
      Downloaded gtk-sys v0.15.3
      Downloaded tempfile v3.3.0
      Downloaded gdk-pixbuf-sys v0.15.10
      Downloaded uuid v1.2.1
      Downloaded webkit2gtk-sys v0.18.0
      Downloaded version-compare v0.1.0
      Downloaded png v0.11.0
      Downloaded version-compare v0.0.11
      Downloaded tendril v0.4.3
      Downloaded tokio v1.21.2
      Downloaded javascriptcore-rs v0.16.0
      Downloaded wry v0.21.1
      Downloaded stable_deref_trait v1.2.0
      Downloaded phf_macros v0.10.0
      Downloaded kuchiki v0.8.1
      Downloaded soup2-sys v0.2.0
      Downloaded webkit2gtk v0.18.2
      Downloaded soup2 v0.2.1
      Downloaded gtk v0.15.5
      Downloaded gio v0.15.12
      Downloaded encoding_rs v0.8.31
      Downloaded tao v0.14.0
      Downloaded brotli v3.3.4
      Downloaded html5ever v0.25.2
      Downloaded ico v0.1.0
      Downloaded gio-sys v0.15.10
      Downloaded atk v0.15.1
      Downloaded gobject-sys v0.15.10
      Downloaded glib v0.15.12
      Downloaded tauri-runtime-wry v0.11.1
      Downloaded system-deps v6.0.3
      Downloaded png v0.17.7
      Downloaded glib-sys v0.15.10
      Downloaded string_cache_codegen v0.5.2
      Downloaded phf v0.8.0
      Downloaded infer v0.7.0
      Downloaded glib-macros v0.15.11
      Downloaded gdk v0.15.4
      Downloaded deflate v0.7.20
      Downloaded pango-sys v0.15.10
      Downloaded gdk-sys v0.15.1
      Downloaded cssparser v0.27.2
      Downloaded cfb v0.6.1
      Downloaded cairo-rs v0.15.12
      Downloaded thin-slice v0.1.1
      Downloaded servo_arc v0.1.1
      Downloaded serialize-to-javascript-impl v0.1.1
      Downloaded phf_macros v0.8.0
      Downloaded cfg-expr v0.11.0
      Downloaded tauri-utils v1.2.0
      Downloaded tauri-macros v1.2.0
      Downloaded system-deps v5.0.0
      Downloaded socket2 v0.4.7
      Downloaded serde_with v1.14.0
      Downloaded pin-utils v0.1.0
      Downloaded phf_shared v0.10.0
      Downloaded javascriptcore-rs-sys v0.4.0
      Downloaded http-range v0.1.5
      Downloaded uuid v0.8.2
      Downloaded utf-8 v0.7.6
      Downloaded unicode-segmentation v1.10.0
      Downloaded tokio-macros v1.8.0
      Downloaded tar v0.4.38
      Downloaded state v0.5.3
      Downloaded slab v0.4.7
      Downloaded siphasher v0.3.10
      Downloaded signal-hook-registry v1.4.0
      Downloaded serde_with_macros v1.5.2
      Downloaded serde_repr v0.1.9
      Downloaded semver-parser v0.10.2
      Downloaded semver v0.11.0
      Downloaded same-file v1.0.6
      Downloaded rustc_version v0.4.0
      Downloaded rustc_version v0.3.3
    

    v1.1.1

    Compare Source

    v1.1.0

    Compare Source

    v1.0.7: tauri v1.0.7

    Compare Source

    Updating crates.io index

    Cargo Audit

    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
          Loaded 469 security advisories (from /home/runner/.cargo/advisory-db)
        Updating crates.io index
        Scanning Cargo.lock for vulnerabilities (458 crate dependencies)
    Crate:     xml-rs
    Version:   0.8.4
    Warning:   unmaintained
    Title:     xml-rs is Unmaintained
    Date:      2022-01-26
    ID:        RUSTSEC-2022-0048
    URL:       https://rustsec.org/advisories/RUSTSEC-2022-0048
    Dependency tree:
    xml-rs 0.8.4
    └── plist 1.3.1
        └── tauri-codegen 1.0.4
            β”œβ”€β”€ tauri-macros 1.0.4
            β”‚   └── tauri 1.0.7
            β”‚       β”œβ”€β”€ tauri 1.0.7
            β”‚       β”œβ”€β”€ restart 0.1.0
            β”‚       └── app-updater 0.1.0
            └── tauri-build 1.0.4
                └── app-updater 0.1.0
    
    warning: 1 allowed warning found
    

    [1.0.7]

    • Escape glob special characters in files/directories when dropping files or using the open/save dialogs.

    Cargo Publish

    Updating crates.io index
       Packaging tauri v1.0.7 (/home/runner/work/tauri/tauri/core/tauri)
       Verifying tauri v1.0.7 (/home/runner/work/tauri/tauri/core/tauri)
     Downloading crates ...
      Downloaded futures v0.3.25
      Downloaded generic-array v0.14.6
      Downloaded futures-macro v0.3.25
      Downloaded block-buffer v0.10.3
      Downloaded convert_case v0.4.0
      Downloaded globset v0.4.9
      Downloaded heck v0.3.3
      Downloaded cpufeatures v0.2.5
      Downloaded http v0.2.8
      Downloaded instant v0.1.12
      Downloaded alloc-stdlib v0.2.2
      Downloaded ctor v0.1.26
      Downloaded http-range v0.1.5
      Downloaded crypto-common v0.1.6
      Downloaded lock_api v0.4.9
      Downloaded cssparser v0.27.2
      Downloaded gobject-sys v0.15.10
      Downloaded gdk-sys v0.15.1
      Downloaded gdk v0.15.4
      Downloaded ppv-lite86 v0.2.17
      Downloaded proc-macro-hack v0.5.19
      Downloaded rand v0.7.3
      Downloaded tar v0.4.38
      Downloaded tempfile v3.3.0
      Downloaded ucd-trie v0.1.5
      Downloaded futf v0.1.5
      Downloaded fxhash v0.2.1
      Downloaded uuid v0.8.2
      Downloaded xattr v0.2.3
      Downloaded soup2-sys v0.2.0
      Downloaded tauri-utils v1.2.0
      Downloaded x11 v2.20.0
      Downloaded webkit2gtk-sys v0.18.0
      Downloaded webkit2gtk v0.18.2
      Downloaded phf_shared v0.10.0
      Downloaded phf_macros v0.10.0
      Downloaded raw-window-handle v0.4.3
      Downloaded thin-slice v0.1.1
      Downloaded version-compare v0.1.0
      Downloaded markup5ever v0.10.1
      Downloaded javascriptcore-rs-sys v0.4.0
      Downloaded glib-macros v0.15.11
      Downloaded pest v2.4.1
      Downloaded tauri-codegen v1.2.0
      Downloaded tauri-macros v1.2.0
      Downloaded pango v0.15.10
      Downloaded serde_with_macros v1.5.2
      Downloaded system-deps v6.0.3
      Downloaded version-compare v0.0.11
      Downloaded x11-dl v2.20.0
      Downloaded tokio v1.21.2
      Downloaded brotli v3.3.4
      Downloaded atk-sys v0.15.1
      Downloaded tendril v0.4.3
      Downloaded serde_with v1.14.0
      Downloaded infer v0.7.0
      Downloaded string_cache v0.8.4
      Downloaded wry v0.19.0
      Downloaded tao v0.12.2
      Downloaded state v0.5.3
      Downloaded selectors v0.22.0
      Downloaded gtk v0.15.5
      Downloaded png v0.17.7
      Downloaded mio v0.8.5
      Downloaded pango-sys v0.15.10
      Downloaded cfb v0.6.1
      Downloaded png v0.11.0
      Downloaded brotli-decompressor v2.3.2
      Downloaded cfg-expr v0.9.1
      Downloaded atk v0.15.1
      Downloaded alloc-no-stdlib v2.0.4
      Downloaded adler32 v1.2.0
      Downloaded gtk-sys v0.15.3
      Downloaded treediff v3.0.2
      Downloaded javascriptcore-rs v0.16.0
      Downloaded string_cache_codegen v0.5.2
      Downloaded num-integer v0.1.45
      Downloaded ignore v0.4.18
      Downloaded glib v0.15.12
      Downloaded proc-macro-crate v1.2.1
      Downloaded precomputed-hash v0.1.1
      Downloaded phf_generator v0.10.0
      Downloaded json-patch v0.2.6
      Downloaded html5ever v0.25.2
      Downloaded inflate v0.3.4
      Downloaded ico v0.1.0
      Downloaded glib-sys v0.15.10
      Downloaded getrandom v0.2.8
      Downloaded deflate v0.7.20
      Downloaded phf_shared v0.8.0
      Downloaded phf_generator v0.8.0
      Downloaded gdk-pixbuf v0.15.11
      Downloaded phf_macros v0.8.0
      Downloaded phf v0.8.0
      Downloaded cairo-sys-rs v0.15.1
      Downloaded system-deps v5.0.0
    

    v1.0.6: tauri v1.0.6

    Compare Source

    Cargo Audit
    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
          Loaded 457 security advisories (from /home/runner/.cargo/advisory-db)
        Updating crates.io index
        Scanning Cargo.lock for vulnerabilities (446 crate dependencies)
    Crate:     ansi_term
    Version:   0.12.1
    Warning:   unmaintained
    Title:     ansi_term is Unmaintained
    Date:      2021-08-18
    ID:        RUSTSEC-2021-0139
    URL:       https://rustsec.org/advisories/RUSTSEC-2021-0139
    Dependency tree:
    ansi_term 0.12.1
    └── tracing-subscriber 0.3.15
        └── loom 0.5.6
            └── state 0.5.3
                └── tauri 1.0.6
                    β”œβ”€β”€ tauri 1.0.6
                    β”œβ”€β”€ restart 0.1.0
                    └── app-updater 0.1.0
    
    Crate:     xml-rs
    Version:   0.8.4
    Warning:   unmaintained
    Title:     xml-rs is Unmaintained
    Date:      2022-01-26
    ID:        RUSTSEC-2022-0048
    URL:       https://rustsec.org/advisories/RUSTSEC-2022-0048
    Dependency tree:
    xml-rs 0.8.4
    β”œβ”€β”€ winrt-notification 0.5.1
    β”‚   └── notify-rust 4.5.8
    β”‚       └── tauri 1.0.6
    β”‚           β”œβ”€β”€ tauri 1.0.6
    β”‚           β”œβ”€β”€ restart 0.1.0
    β”‚           └── app-updater 0.1.0
    └── plist 1.3.1
        └── tauri-codegen 1.0.4
            β”œβ”€β”€ tauri-macros 1.0.4
            β”‚   └── tauri 1.0.6
            └── tauri-build 1.0.4
                └── app-updater 0.1.0
    
    warning: 2 allowed warnings found
    

    [1.0.6]

    • Fix fs.readDir recursive option reading symlinked directories that are not allowed by the scope.
      • bb178829 fix(endpoints/fs/readDir): don't read symlinks that are not allowed b… (#​5123) on 2022-09-08
    Cargo Publish
    Updating crates.io index
       Packaging tauri v1.0.6 (/home/runner/work/tauri/tauri/core/tauri)
       Verifying tauri v1.0.6 (/home/runner/work/tauri/tauri/core/tauri)
     Downloading crates ...
      Downloaded num-traits v0.2.15
      Downloaded phf_shared v0.8.0
      Downloaded phf_generator v0.10.0
      Downloaded alloc-stdlib v0.2.2
      Downloaded rand_chacha v0.2.2
      Downloaded rand v0.7.3
      Downloaded remove_dir_all v0.5.3
      Downloaded ignore v0.4.18
      Downloaded rand_core v0.6.4
      Downloaded same-file v1.0.6
      Downloaded rand_core v0.5.1
      Downloaded deflate v0.7.20
      Downloaded soup2 v0.2.1
      Downloaded serde_with_macros v1.5.2
      Downloaded serde_with v1.14.0
      Downloaded semver-parser v0.10.2
      Downloaded png v0.11.0
      Downloaded socket2 v0.4.7
      Downloaded field-offset v0.3.4
      Downloaded convert_case v0.4.0
      Downloaded ctor v0.1.23
      Downloaded gdk-pixbuf-sys v0.15.10
      Downloaded gtk3-macros v0.15.4
      Downloaded webkit2gtk-sys v0.18.0
      Downloaded x11 v2.20.0
      Downloaded heck v0.3.3
      Downloaded xattr v0.2.3
      Downloaded alloc-no-stdlib v2.0.4
      Downloaded javascriptcore-rs-sys v0.4.0
      Downloaded darling_macro v0.13.4
      Downloaded x11-dl v2.20.0
      Downloaded walkdir v2.3.2
      Downloaded nodrop v0.1.14
      Downloaded tauri-runtime v0.10.2
      Downloaded futures-io v0.3.24
      Downloaded string_cache_codegen v0.5.2
      Downloaded phf v0.10.1
      Downloaded phf_shared v0.10.0
      Downloaded utf-8 v0.7.6
      Downloaded version-compare v0.1.0
      Downloaded version-compare v0.0.11
      Downloaded tauri-macros v1.1.0
      Downloaded glib-sys v0.15.10
      Downloaded system-deps v5.0.0
      Downloaded tempfile v3.3.0
      Downloaded tendril v0.4.3
      Downloaded uuid v0.8.2
      Downloaded pango-sys v0.15.10
      Downloaded pango v0.15.10
      Downloaded tokio v1.21.1
      Downloaded sha2 v0.10.5
      Downloaded serialize-to-javascript v0.1.1
      Downloaded phf_macros v0.8.0
      Downloaded unicode-segmentation v1.10.0
      Downloaded wry v0.19.0
      Downloaded stable_deref_trait v1.2.0
      Downloaded soup2-sys v0.2.0
      Downloaded tauri-utils v1.1.0
      Downloaded gtk v0.15.5
      Downloaded brotli v3.3.4
      Downloaded tao v0.12.2
      Downloaded tauri-runtime-wry v0.10.2
      Downloaded signal-hook-registry v1.4.0
      Downloaded selectors v0.22.0
      Downloaded pest v2.3.1
      Downloaded parking_lot v0.12.1
      Downloaded mio v0.8.4
      Downloaded kuchiki v0.8.1
      Downloaded ucd-trie v0.1.5
      Downloaded infer v0.7.0
      Downloaded string_cache v0.8.4
      Downloaded markup5ever v0.10.1
      Downloaded lock_api v0.4.8
      Downloaded json-patch v0.2.6
      Downloaded javascriptcore-rs v0.16.0
      Downloaded inflate v0.3.4
      Downloaded ico v0.1.0
      Downloaded html5ever v0.25.2
      Downloaded gtk-sys v0.15.3
      Downloaded globset v0.4.9
      Downloaded glib v0.15.12
      Downloaded tar v0.4.38
      Downloaded glib-macros v0.15.11
      Downloaded state v0.5.3
      Downloaded glob v0.3.0
      Downloaded getrandom v0.2.7
      Downloaded futures-executor v0.3.24
      Downloaded gobject-sys v0.15.10
      Downloaded gdk v0.15.4
      Downloaded cssparser v0.27.2
      Downloaded tauri-codegen v1.1.0
      Downloaded gdk-pixbuf v0.15.11
      Downloaded darling v0.13.4
      Downloaded cfg-expr v0.10.3
      Downloaded siphasher v0.3.10
    

    v1.0.5

    Compare Source

    v1.0.4

    Compare Source

    v1.0.3

    Compare Source

    v1.0.2

    Compare Source

    v1.0.1

    Compare Source


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • RUSTSEC-2021-0139: ansi_term is Unmaintained

    RUSTSEC-2021-0139: ansi_term is Unmaintained

    ansi_term is Unmaintained

    | Details | | | ------------------- | ---------------------------------------------- | | Status | unmaintained | | Package | ansi_term | | Version | 0.12.1 | | URL | https://github.com/ogham/rust-ansi-term/issues/72 | | Date | 2021-08-18 |

    The maintainer has adviced this crate is deprecated and will not receive any maintenance.

    The crate does not seem to have much dependencies and may or may not be ok to use as-is.

    Last release seems to have been three years ago.

    Possible Alternative(s)

    The below list has not been vetted in any way and may or may not contain alternatives;

    See advisory page for additional details.

    opened by github-actions[bot] 0
  • RUSTSEC-2022-0048: xml-rs is Unmaintained

    RUSTSEC-2022-0048: xml-rs is Unmaintained

    xml-rs is Unmaintained

    | Details | | | ------------------- | ---------------------------------------------- | | Status | unmaintained | | Package | xml-rs | | Version | 0.8.4 | | URL | https://github.com/netvl/xml-rs/issues | | Date | 2022-01-26 |

    xml-rs is a XML parser has open issues around parsing including integer overflows / panics that may or may not be an issue with untrusted data.

    Together with these open issues with Unmaintained status xml-rs may or may not be suited to parse untrusted data.

    Alternatives

    See advisory page for additional details.

    opened by github-actions[bot] 0
  • I couldn't get it to work.

    I couldn't get it to work.

    Cool idea. I couldn't get it to work.

    Could you help?

    Error: Couldn't connect to server

    Can't shake hands

    Thanks for listening

    Tauri config

    {
    	"$schema": "../node_modules/@tauri-apps/cli/schema.json",
    	"build": {
    		"beforeBuildCommand": "npm run build",
    		"beforeDevCommand": "npm run dev",
    		"devPath": "http://localhost:3000",
    		"distDir": "../.output/public",
    		"withGlobalTauri": true
    	},
    	"package": {
    		"productName": "royal",
    		"version": "0.1.0"
    	},
    	"tauri": {
    		"allowlist": {
    			"all": true
    		},
    		"bundle": {
    			"active": true,
    			"category": "DeveloperTool",
    			"copyright": "",
    			"deb": {
    				"depends": []
    			},
    			"externalBin": [],
    			"icon": [
    				"icons/32x32.png",
    				"icons/128x128.png",
    				"icons/[email protected]",
    				"icons/icon.icns",
    				"icons/icon.ico"
    			],
    			"identifier": "royal.custom.bundleid",
    			"longDescription": "",
    			"macOS": {
    				"entitlements": null,
    				"exceptionDomain": "",
    				"frameworks": [],
    				"providerShortName": null,
    				"signingIdentity": null
    			},
    			"resources": [],
    			"shortDescription": "",
    			"targets": "all",
    			"windows": {
    				"certificateThumbprint": null,
    				"digestAlgorithm": "sha256",
    				"timestampUrl": ""
    			}
    		},
    		"security": {
    			"csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'"
    		},
    		"updater": {
    			"active": false
    		},
    		"windows": [
    			{
    				"fullscreen": false,
    				"height": 600,
    				"resizable": true,
    				"title": "Royal",
    				"width": 800
    			}
    		]
    	}
    }
    
    

    Cargo

    [package]
    name = "app"
    version = "0.1.0"
    description = "A Tauri App"
    authors = ["you"]
    license = ""
    repository = ""
    default-run = "app"
    edition = "2021"
    rust-version = "1.62.1"
    
    # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
    
    [build-dependencies]
    tauri-build = { version = "1.0.4", features = [] }
    
    [dependencies]
    serde_json = "1.0"
    tauri-invoke-http = { git = "https://github.com/tauri-apps/tauri-invoke-http", branch = "dev" }
    serde = { version = "1.0.140", features = ["derive"] }
    tauri = { version = "1.0.5", features = ["api-all"] }
    
    [features]
    # by default Tauri runs in production mode
    # when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
    default = [ "custom-protocol" ]
    # this feature is used used for production builds where `devPath` points to the filesystem
    # DO NOT remove this
    custom-protocol = [ "tauri/custom-protocol" ]
    
    

    Main

    #![cfg_attr(
    	all(not(debug_assertions), target_os = "windows"),
    	windows_subsystem = "windows"
    )]
    
    #[tauri::command]
    fn my_command(args: u64) -> Result<String, ()> {
    	println!("executed command with args {:?}", args);
    	Ok("executed".into())
    }
    
    fn main() {
    	let http = tauri_invoke_http::Invoke::new(["tauri://localhost", "http://localhost:8080"]);
    
    	tauri::Builder::default()
    		.invoke_system(http.initialization_script(), http.responder())
    		.setup(move |app| {
    			http.start(app.handle());
    			Ok(())
    		})
    		.invoke_handler(tauri::generate_handler![my_command])
    		.run(tauri::generate_context!())
    		.expect("error while running tauri application");
    }
    
    

    javascript

    <script setup>
    import { invoke } from '@tauri-apps/api/tauri'
    
    invoke('my_command', { args: 5 }).then(data => {
      console.log(data)
    }).catch(error => {
      console.log(error)
    })
    </script>
    
    opened by marcelodelta 1
  • Publish New Versions

    Publish New Versions

    Version Updates

    Merging this PR will release new versions of the following packages based on your change files.

    tauri-invoke-http

    [0.1.0]

    • Initial release.
      • 67b0218 first commit on 2021-11-16
    version updates 
    opened by github-actions[bot] 0
Owner
Tauri
Build smaller, faster, and more secure desktop applications with a web frontend
Tauri
Rust port of the official Windows Driver Samples on Github. Leverages windows-drivers-rs

Rust Driver Samples This is a Rust port of the driver samples from the original Windows Driver Samples on Github. The repository provides examples and

Microsoft 80 Oct 10, 2023
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
This is a small demo to accompany the Tauri + Yew tutorial

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

Steve Pryde 94 Jan 2, 2023
πŸ“¦ 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
Rust + Yew + Axum + Tauri, full-stack Rust development for Desktop apps.

rust-yew-axum-tauri-desktop template Rust + Yew + Axum + Tauri, full-stack Rust development for Desktop apps. Crates frontend: Yew frontend app for de

Jet Li 54 Dec 23, 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
πŸ¦€ 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 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
Tauri and Leptos example.

tauri-leptos-example Tauri Leptos Requires Rust Nightly. See Leptos nightly Note. # Install Tauri CLI cargo install tauri-cli # Build and develop for

Michal Vavra 5 Dec 6, 2022
A cross-platform tauri gui where Oblique Strategies meets Pomodoro

Obliqoro Oblique Strategies meets Pomodoro Built in Rust, Vue3, and Typescript, using Tauri, and SQLite Screenshots About Obliqoro is an open source,

Jack Wills 8 Dec 19, 2022
OpenAI ChatGPT desktop app for Mac, Windows, & Linux menubar using Tauri & Rust

ChatGPT Desktop App Unofficial open source OpenAI ChatGPT desktop app for mac, windows, and linux menubar using tauri & rust. Downloads Windows (2.7 M

Sonny Lazuardi 732 Jan 5, 2023
Web-wrapped Supabase desktop app for macOS, Windows & Linux powered by Tauri

Supabase Desktop App What is it? It's a cross-platform web-wrapped Supabase desktop app powered by Tauri. You can install it on your macOS, Windows (u

Abiel Zulio M 12 Jan 25, 2023
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
A lightweight new Bing (AI chat) desktop application which based on Tauri.

Bing Lite A lightweight new Bing (AI chat) desktop application which based on Tauri. No more Microsoft Edge, no more Chromium/Electron! Download The l

a.e. 6 Apr 5, 2023
πŸ₯ƒ A plugin for swizzling Tauri’s NSWindow to NSPanel

Swizzle Tauri's NSWindow to NSPanel Install There are three general methods of installation that we can recommend. Use crates.io and npm (easiest, and

Victor Aremu 11 Mar 24, 2023
A Tauri-based spreadsheet

Pulsars A Tauri-based spreadsheet The following cool libraries made it possible to build Pulsars ?? : fortune-sheet: TypeScript library for the spread

Ronie Martinez 13 Apr 1, 2023