Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Upgrade Tauri to latest version #103

Merged
merged 8 commits into from
Mar 24, 2022
Merged

Upgrade Tauri to latest version #103

merged 8 commits into from
Mar 24, 2022

Conversation

nazar-pc
Copy link
Member

I considered downgrading zstd version in a fork, but the simpler solution for now is to just disable compression.

Compression wasn't there before in Tauri (at least there was no such feature) and Debian package size got much smaller after upgrade anyway (30.2M -> 22.7M).

@nazar-pc
Copy link
Member Author

Please test if this actually works, I only checked that it compiles on Linux.

@nazar-pc nazar-pc linked an issue Mar 20, 2022 that may be closed by this pull request
3 tasks
Copy link
Contributor

@ozgunozerk ozgunozerk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately on macos, it creates the runtime error on quasar side:
Scoped command osascript not found.
And produces an app with a blank screen with no functionality.
image

I will inspect this further, but this is not ready to merge yet.

@nazar-pc nazar-pc disabled auto-merge March 21, 2022 12:26
@nazar-pc nazar-pc requested a review from 1devNdogs March 21, 2022 12:26
@nazar-pc
Copy link
Member Author

For quasar we might need Leo's help

@1devNdogs
Copy link
Contributor

We need to update a few settings and security checks on tauri.conf.json. I have found at least these two as critical.

TO FIX fs scope

Solution:

  • The scope error is related to this new configurations. Adding scope will be able to read and write files and dirs on it. On Linux at least I was getting similar errors and were solved by adding this to tauri > allowlist > fs > scope config.

Two problems:

  • The user will be limited to this scope, this will be a problem with selecting non-HOME plot directory, like another partition, external drives, etc.
  • Also, this configuration will be applied on the build and looks we can not update the scope after, still checking if there is another way to set this or maybe update the scope on user selection. I still can't find a solution to this.

@ozgunozerk can you try adding this on tauri.conf.json

"fs": { "all": true, "scope": ["$HOME/*"] }

TO FIX Shell scope:

Looks we need to apply some confs also, but I can not test in here. @ozgunozerk this will probably solve the applescript execution problems. Just need to find the correct configuration.

https://tauri.studio/docs/api/js/modules/shell and https://tauri.studio/docs/api/js/modules/shell#security

@nazar-pc
Copy link
Member Author

I read that and thought "all": true was sufficient, which we already have in place. Probably not, it is trying to run the thing under /usr/bin

@1devNdogs
Copy link
Contributor

Also check #90, will be fixed automatically if we get this upgrade running.

@nazar-pc nazar-pc linked an issue Mar 22, 2022 that may be closed by this pull request
@ozgunozerk
Copy link
Contributor

We fixed the issue with Leo. And tauri documentation was kind of misleading, so we will try to fix that as well. It is now working under macos. I will test it on Windows & Linux as well.

@ozgunozerk
Copy link
Contributor

ozgunozerk commented Mar 24, 2022

with march 03-23 update on rust nightly, ring crate is creating problems on the building phase.

error: no rules expected the token `aarch64_apple`
   --> /Users/ozgunozerk/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/src/cpu.rs:257:13
    |
165 |     macro_rules! features {
    |     --------------------- when calling this macro
...
257 |             aarch64_apple: true,
    |             ^^^^^^^^^^^^^ no rules expected this token in macro call

error[E0425]: cannot find value `AES` in module `cpu::arm`
   --> /Users/ozgunozerk/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/src/aead/aes.rs:381:65
    |
381 |         if cpu::intel::AES.available(cpu_features) || cpu::arm::AES.available(cpu_features) {
    |                                                                 ^^^ not found in `cpu::arm`
    |
help: consider importing this constant
    |
15  | use crate::cpu::intel::AES;
    |

error[E0425]: cannot find value `PMULL` in module `cpu::arm`
   --> /Users/ozgunozerk/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/src/aead/gcm.rs:315:26
    |
315 |             || cpu::arm::PMULL.available(cpu_features)
    |                          ^^^^^ not found in `cpu::arm`

error[E0425]: cannot find value `ARMCAP_STATIC` in this scope
   --> /Users/ozgunozerk/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/src/cpu.rs:235:41
    |
235 |             if self.mask == self.mask & ARMCAP_STATIC {
    |                                         ^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `ARMCAP_STATIC` in this scope
   --> /Users/ozgunozerk/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/src/cpu.rs:288:36
    |
288 |     static mut GFp_armcap_P: u32 = ARMCAP_STATIC;
    |                                    ^^^^^^^^^^^^^ not found in this scope

@ozgunozerk
Copy link
Contributor

Thanks Nazar, I've opened a issue about ring, I will keep an eye on these threads you provided and update to nightly when this issue is resolved. For now, I believe it is ok to continue with 2022-02-15 version of rust.

@ozgunozerk
Copy link
Contributor

Tested on macos and windows, it is working

@ozgunozerk ozgunozerk self-requested a review March 24, 2022 12:41
@ozgunozerk ozgunozerk enabled auto-merge (squash) March 24, 2022 13:07
@ozgunozerk ozgunozerk merged commit 98465a8 into main Mar 24, 2022
@ozgunozerk ozgunozerk deleted the upgrade-tauri branch March 24, 2022 14:00
@ozgunozerk ozgunozerk linked an issue Apr 2, 2022 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants