Merge remote-tracking branch 'origin/dev' into next

This commit is contained in:
Lucas Nogueira 2022-11-11 11:46:15 -03:00
commit 169d2434ff
No known key found for this signature in database
GPG Key ID: C54D79C4018F1D19
15 changed files with 83 additions and 82 deletions

View File

@ -7,7 +7,7 @@
"getPublishedVersion": "cargo search ${ pkgFile.pkg.package.name } --limit 1 | sed -nE \"s/^[^\\\"]*\\\"//; s/\\\".*//1p\"", "getPublishedVersion": "cargo search ${ pkgFile.pkg.package.name } --limit 1 | sed -nE \"s/^[^\\\"]*\\\"//; s/\\\".*//1p\"",
"prepublish": [ "prepublish": [
"sudo apt-get update", "sudo apt-get update",
"sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf", "sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev",
"cargo install cargo-audit --features=fix", "cargo install cargo-audit --features=fix",
{ {
"command": "cargo generate-lockfile", "command": "cargo generate-lockfile",

View File

@ -40,7 +40,7 @@ jobs:
if: matrix.platform == 'ubuntu-latest' if: matrix.platform == 'ubuntu-latest'
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:

View File

@ -47,7 +47,7 @@ jobs:
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
sudo apt-get update sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf xvfb sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev xvfb
wget https://github.com/sharkdp/hyperfine/releases/download/v1.11.0/hyperfine_1.11.0_amd64.deb wget https://github.com/sharkdp/hyperfine/releases/download/v1.11.0/hyperfine_1.11.0_amd64.deb
sudo dpkg -i hyperfine_1.11.0_amd64.deb sudo dpkg -i hyperfine_1.11.0_amd64.deb
pip install memory_profiler pip install memory_profiler

View File

@ -30,7 +30,7 @@ jobs:
if: matrix.platform == 'ubuntu-latest' if: matrix.platform == 'ubuntu-latest'
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:

View File

@ -111,7 +111,7 @@ jobs:
- name: install dependencies - name: install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
- name: Test - name: Test
run: | run: |

View File

@ -62,7 +62,7 @@ jobs:
- name: install dependencies - name: install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
@ -74,6 +74,7 @@ jobs:
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:
workspaces: core -> ../target workspaces: core -> ../target
save-if: ${{ matrix.clippy.key == 'all' }}
- uses: actions-rs/clippy-check@v1 - uses: actions-rs/clippy-check@v1
with: with:

View File

@ -259,7 +259,7 @@ jobs:
- name: install system dependencies - name: install system dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
- name: Test bindings - name: Test bindings
run: yarn test run: yarn test
test-linux-x64-musl-binding: test-linux-x64-musl-binding:
@ -298,7 +298,7 @@ jobs:
shell: bash shell: bash
- name: Install system dependencies - name: Install system dependencies
run: | run: |
apk add openssl-dev musl-dev glib-dev cairo-dev pkgconfig gdk-pixbuf-dev webkit2gtk-dev curl libappindicator-dev patchelf librsvg-dev gtk+3.0-dev apk add openssl-dev musl-dev glib-dev cairo-dev pkgconfig gdk-pixbuf-dev webkit2gtk-dev curl libappindicator-dev gtk+3.0-dev
- name: Setup and run tests - name: Setup and run tests
run: | run: |
yarn tauri --help yarn tauri --help
@ -355,7 +355,7 @@ jobs:
set -e set -e
export PATH=/usr/local/cargo/bin/:/usr/local/fnm:$PATH export PATH=/usr/local/cargo/bin/:/usr/local/fnm:$PATH
apt-get update apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --no-install-recommends -y unzip libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --no-install-recommends -y unzip webkit2gtk-4.0 libayatana-appindicator3-dev
bash bash
curl https://sh.rustup.rs -sSf | bash -s -- -y curl https://sh.rustup.rs -sSf | bash -s -- -y
curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "/usr/local/fnm" --skip-shell curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "/usr/local/fnm" --skip-shell

View File

@ -51,7 +51,7 @@ jobs:
if: matrix.platform == 'ubuntu-latest' if: matrix.platform == 'ubuntu-latest'
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:

View File

@ -57,7 +57,7 @@ jobs:
os: macos-latest, os: macos-latest,
toolchain: '1.59.0', toolchain: '1.59.0',
cross: false, cross: false,
acommand: 'build' command: 'build'
} }
- { - {
target: aarch64-linux-android, target: aarch64-linux-android,
@ -66,6 +66,19 @@ jobs:
cross: true, cross: true,
command: 'build' command: 'build'
} }
features:
- {
args: --no-default-features --features native-tls-vendored,
key: no-default
}
- {
args: --features native-tls-vendored,api-all,
key: api-all
}
- {
args: --features native-tls-vendored,compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart,
key: all
}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -82,29 +95,16 @@ jobs:
if: contains(matrix.platform.target, 'unknown-linux') if: contains(matrix.platform.target, 'unknown-linux')
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:
workspaces: core -> ../target workspaces: core -> ../target
save-if: ${{ matrix.features.key == 'all' }}
- name: test - name: test
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
use-cross: ${{ matrix.platform.cross }} use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }} command: ${{ matrix.platform.command }}
args: --target ${{ matrix.platform.target }} --features native-tls-vendored args: --target ${{ matrix.platform.target }} ${{ matrix.features.args }}
- name: test api-all
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }}
args: --target ${{ matrix.platform.target }} --features native-tls-vendored,api-all
- name: test all features
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.platform.cross }}
command: ${{ matrix.platform.command }}
args: --target ${{ matrix.platform.target }} --features native-tls-vendored,compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart

View File

@ -157,7 +157,7 @@ jobs:
- name: Install required packages - name: Install required packages
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:

View File

@ -594,25 +594,25 @@ impl Response {
reader reader
} }
/// Convert the response into a Stream of [`bytes::Bytes`] from the body. // Convert the response into a Stream of [`bytes::Bytes`] from the body.
/// //
/// # Examples // # Examples
/// //
/// ```no_run // ```no_run
/// use futures_util::StreamExt; // use futures_util::StreamExt;
/// //
/// # async fn run() -> Result<(), Box<dyn std::error::Error>> { // # async fn run() -> Result<(), Box<dyn std::error::Error>> {
/// let client = tauri::api::http::ClientBuilder::new().build()?; // let client = tauri::api::http::ClientBuilder::new().build()?;
/// let mut stream = client.send(tauri::api::http::HttpRequestBuilder::new("GET", "http://httpbin.org/ip")?) // let mut stream = client.send(tauri::api::http::HttpRequestBuilder::new("GET", "http://httpbin.org/ip")?)
/// .await? // .await?
/// .bytes_stream(); // .bytes_stream();
/// //
/// while let Some(item) = stream.next().await { // while let Some(item) = stream.next().await {
/// println!("Chunk: {:?}", item?); // println!("Chunk: {:?}", item?);
/// } // }
/// # Ok(()) // # Ok(())
/// # } // # }
/// ``` // ```
#[cfg(feature = "reqwest-client")] #[cfg(feature = "reqwest-client")]
#[allow(dead_code)] #[allow(dead_code)]
pub(crate) fn bytes_stream( pub(crate) fn bytes_stream(

View File

@ -34,9 +34,7 @@ mod rust {
Ok(()) Ok(())
}) })
.invoke_handler(tauri::generate_handler![close_splashscreen]) .invoke_handler(tauri::generate_handler![close_splashscreen])
.run(tauri::generate_context!( .run(super::context())
"../../examples/splashscreen/tauri.conf.json"
))
.expect("failed to run app"); .expect("failed to run app");
} }
} }
@ -64,7 +62,7 @@ mod ui {
} }
pub fn main() { pub fn main() {
let context = tauri::generate_context!("../../examples/splashscreen/tauri.conf.json"); let context = super::context();
tauri::Builder::default() tauri::Builder::default()
.menu(if cfg!(target_os = "macos") { .menu(if cfg!(target_os = "macos") {
tauri::Menu::os_default(&context.package_info().name) tauri::Menu::os_default(&context.package_info().name)
@ -87,6 +85,10 @@ mod ui {
} }
} }
fn context() -> tauri::Context<tauri::utils::assets::EmbeddedAssets> {
tauri::generate_context!("../../examples/splashscreen/tauri.conf.json")
}
fn main() { fn main() {
// toggle this flag to experiment with different splashscreen usages // toggle this flag to experiment with different splashscreen usages
let ui = false; let ui = false;

View File

@ -1,6 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -28,5 +27,4 @@
}) })
</script> </script>
</body> </body>
</html> </html>

View File

@ -6,7 +6,7 @@
"getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -", "getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
"prepublish": [ "prepublish": [
"sudo apt-get update", "sudo apt-get update",
"sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0", "sudo apt-get install -y webkit2gtk-4.0",
"cargo install cargo-audit", "cargo install cargo-audit",
{ {
"command": "cargo generate-lockfile", "command": "cargo generate-lockfile",

View File

@ -6,7 +6,7 @@
"getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -", "getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
"prepublish": [ "prepublish": [
"sudo apt-get update", "sudo apt-get update",
"sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0", "sudo apt-get install -y webkit2gtk-4.0",
"cargo install cargo-audit", "cargo install cargo-audit",
{ {
"command": "cargo generate-lockfile", "command": "cargo generate-lockfile",