wip
This commit is contained in:
parent
6441a58a05
commit
6526c7c999
11 changed files with 76 additions and 58 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -40,7 +40,7 @@ jobs:
|
|||
- name: Install Tauri CLI
|
||||
run: |
|
||||
cd examples/test
|
||||
wget -qO- https://github.com/tauri-apps/tauri/releases/download/cli.rs-v1.1.1/cargo-tauri-x86_64-unknown-linux-gnu.tgz | tar -xzf- -C ~/.cargo/bin
|
||||
wget -qO- https://github.com/tauri-apps/tauri/releases/download/cli.rs-v1.2.0/cargo-tauri-x86_64-unknown-linux-gnu.tgz | tar -xzf- -C ~/.cargo/bin
|
||||
- name: Install Trunk
|
||||
run: |
|
||||
cd examples/test
|
||||
|
|
56
Cargo.lock
generated
56
Cargo.lock
generated
|
@ -208,12 +208,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cargo_toml"
|
||||
version = "0.11.8"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e72c3ff59e3b7d24630206bb63a73af65da4ed5df1f76ee84dfafb9fee2ba60e"
|
||||
checksum = "aa0e3586af56b3bfa51fca452bd56e8dbbbd5d8d81cbf0b7e4e35b695b537eb8"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"toml",
|
||||
]
|
||||
|
||||
|
@ -578,6 +577,12 @@ dependencies = [
|
|||
"dtoa",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dunce"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c"
|
||||
|
||||
[[package]]
|
||||
name = "embed_plist"
|
||||
version = "1.2.2"
|
||||
|
@ -1250,9 +1255,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "jni"
|
||||
version = "0.19.0"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec"
|
||||
checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c"
|
||||
dependencies = [
|
||||
"cesu8",
|
||||
"combine",
|
||||
|
@ -2749,9 +2754,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tao"
|
||||
version = "0.14.0"
|
||||
version = "0.15.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43336f5d1793543ba96e2a1e75f3a5c7dcd592743be06a0ab3a190f4fcb4b934"
|
||||
checksum = "42c460173627564bde252ca5ebf346ba5b37c5cee1a445782bacc8e9b8d38b5e"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cairo-rs",
|
||||
|
@ -2806,9 +2811,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "1.1.1"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "efbf22abd61d95ca9b2becd77f9db4c093892f73e8a07d21d8b0b2bf71a7bcea"
|
||||
checksum = "ac135e45c2923bd91edbb95a0d656f8d025389697e34d6d79166952bfa79c61c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"attohttpc",
|
||||
|
@ -2859,9 +2864,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tauri-build"
|
||||
version = "1.1.1"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0991fb306849897439dbd4a72e4cbed2413e2eb26cb4b3ba220b94edba8b4b88"
|
||||
checksum = "ef796f49abc98e6de0abe1b655120addc9d82363d8fc2304e71a4177c25e783c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo_toml",
|
||||
|
@ -2875,9 +2880,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tauri-codegen"
|
||||
version = "1.1.1"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "356fa253e40ae4d6ff02075011f2f2bb4066f5c9d8c1e16ca6912d7b75903ba6"
|
||||
checksum = "afcb77cf7bfe3d8f886e73a7fa6157587d015c599671180b76595c1aef175ba8"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"brotli",
|
||||
|
@ -2901,9 +2906,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tauri-macros"
|
||||
version = "1.1.1"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d6051fd6940ddb22af452340d03c66a3e2f5d72e0788d4081d91e31528ccdc4d"
|
||||
checksum = "f24f481b0b2acfc288ac78755f00ebea53992c7365a165af64cb5ae00806edea"
|
||||
dependencies = [
|
||||
"heck 0.4.0",
|
||||
"proc-macro2",
|
||||
|
@ -2915,14 +2920,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tauri-runtime"
|
||||
version = "0.11.1"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d49439a5ea47f474572b854972f42eda2e02a470be5ca9609cc83bb66945abe2"
|
||||
checksum = "5fc5d54c476defa5436e70e0d0a06e3cb0f49b6f863895995d5e3769411769cf"
|
||||
dependencies = [
|
||||
"gtk",
|
||||
"http",
|
||||
"http-range",
|
||||
"infer",
|
||||
"rand 0.8.5",
|
||||
"raw-window-handle",
|
||||
"serde",
|
||||
|
@ -2936,9 +2940,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tauri-runtime-wry"
|
||||
version = "0.11.1"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "28dce920995fd49907aa9bea7249ed1771454f11f7611924c920a1f75fb614d4"
|
||||
checksum = "d78c55091701426c2519c7e9f1dc2dd33e533af4e75eae89cedc6995409351a2"
|
||||
dependencies = [
|
||||
"cocoa",
|
||||
"gtk",
|
||||
|
@ -2962,7 +2966,6 @@ dependencies = [
|
|||
"semver 1.0.14",
|
||||
"serde",
|
||||
"serde-wasm-bindgen",
|
||||
"tauri",
|
||||
"tauri-sys",
|
||||
"thiserror",
|
||||
"url",
|
||||
|
@ -2996,15 +2999,16 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tauri-utils"
|
||||
version = "1.1.1"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e8fdae6f29cef959809a3c3afef510c5b715a446a597ab8b791497585363f39"
|
||||
checksum = "d64c9a09ba1538b8e67ae8c78c10904f36ce38d364bf7f089ec807032a826b02"
|
||||
dependencies = [
|
||||
"brotli",
|
||||
"ctor",
|
||||
"glob",
|
||||
"heck 0.4.0",
|
||||
"html5ever",
|
||||
"infer",
|
||||
"json-patch",
|
||||
"kuchiki",
|
||||
"memchr",
|
||||
|
@ -3850,15 +3854,16 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wry"
|
||||
version = "0.21.1"
|
||||
version = "0.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ff5c1352b4266fdf92c63479d2f58ab4cd29dc4e78fbc1b62011ed1227926945"
|
||||
checksum = "923d297b203eae65b095af16c02978b7932be1968012b4da7138390edf34dea5"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"block",
|
||||
"cocoa",
|
||||
"core-graphics",
|
||||
"crossbeam-channel",
|
||||
"dunce",
|
||||
"gdk",
|
||||
"gio",
|
||||
"glib",
|
||||
|
@ -3874,6 +3879,7 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_json",
|
||||
"sha2",
|
||||
"soup2",
|
||||
"tao",
|
||||
"thiserror",
|
||||
"url",
|
||||
|
|
|
@ -18,7 +18,7 @@ semver = { version = "1.0.14", optional = true, features = ["serde"] }
|
|||
[dev-dependencies]
|
||||
wasm-bindgen-test = "0.3.33"
|
||||
tauri-sys = { path = ".", features = ["all"] }
|
||||
tauri = "1.1.1"
|
||||
# tauri = "1.1.1"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
|
6
examples/test/dist/index.html
vendored
6
examples/test/dist/index.html
vendored
|
@ -2,10 +2,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>Tauri + Yew App</title>
|
||||
|
||||
<link rel="preload" href="/tauri-sys-test-ui-f3731bf7a986379f_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
|
||||
<link rel="modulepreload" href="/tauri-sys-test-ui-f3731bf7a986379f.js"></head>
|
||||
<link rel="preload" href="/tauri-sys-test-ui-94e40ba9adfa8fe6_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
|
||||
<link rel="modulepreload" href="/tauri-sys-test-ui-94e40ba9adfa8fe6.js"></head>
|
||||
<body>
|
||||
<script type="module">import init from '/tauri-sys-test-ui-f3731bf7a986379f.js';init('/tauri-sys-test-ui-f3731bf7a986379f_bg.wasm');</script><script>(function () {
|
||||
<script type="module">import init from '/tauri-sys-test-ui-94e40ba9adfa8fe6.js';init('/tauri-sys-test-ui-94e40ba9adfa8fe6_bg.wasm');</script><script>(function () {
|
||||
var protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||
var url = protocol + '//' + window.location.host + '/_trunk/ws';
|
||||
var poll_interval = 5000;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { getName, getTauriVersion, getVersion } from './snippets/tauri-sys-91bd50ded94e0ed7/src/app.js';
|
||||
import { readText, writeText } from './snippets/tauri-sys-91bd50ded94e0ed7/src/clipboard.js';
|
||||
import { emit } from './snippets/tauri-sys-91bd50ded94e0ed7/src/event.js';
|
||||
import { exit } from './snippets/tauri-sys-91bd50ded94e0ed7/src/process.js';
|
||||
import { invoke } from './snippets/tauri-sys-91bd50ded94e0ed7/src/tauri.js';
|
||||
|
||||
let wasm;
|
||||
|
@ -271,6 +272,20 @@ async function load(module, imports) {
|
|||
function getImports() {
|
||||
const imports = {};
|
||||
imports.wbg = {};
|
||||
imports.wbg.__wbg_readText_94a6e8d9907e78cc = function() { return handleError(function () {
|
||||
const ret = readText();
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_writeText_f97e44754fa0ff39 = function() { return handleError(function (arg0, arg1) {
|
||||
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
||||
const ret = writeText(v0);
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_invoke_9b778281ea803eaa = function() { return handleError(function (arg0, arg1, arg2) {
|
||||
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
||||
const ret = invoke(v0, takeObject(arg2));
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_getVersion_ffafb063403bc617 = function() { return handleError(function () {
|
||||
const ret = getVersion();
|
||||
return addHeapObject(ret);
|
||||
|
@ -283,16 +298,6 @@ function getImports() {
|
|||
const ret = getName();
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_invoke_9b778281ea803eaa = function() { return handleError(function (arg0, arg1, arg2) {
|
||||
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
||||
const ret = invoke(v0, takeObject(arg2));
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_emit_d58da538f5751592 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
||||
const ret = emit(v0, takeObject(arg2));
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
||||
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
||||
return addHeapObject(ret);
|
||||
|
@ -314,15 +319,15 @@ function getImports() {
|
|||
const ret = getObject(arg0);
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbg_readText_94a6e8d9907e78cc = function() { return handleError(function () {
|
||||
const ret = readText();
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_writeText_f97e44754fa0ff39 = function() { return handleError(function (arg0, arg1) {
|
||||
imports.wbg.__wbg_emit_d58da538f5751592 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||
var v0 = getCachedStringFromWasm0(arg0, arg1);
|
||||
const ret = writeText(v0);
|
||||
const ret = emit(v0, takeObject(arg2));
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_exit_20b0b9ccb0860063 = function(arg0) {
|
||||
const ret = exit(arg0 >>> 0);
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
||||
const ret = getStringFromWasm0(arg0, arg1);
|
||||
return addHeapObject(ret);
|
||||
|
@ -473,6 +478,9 @@ function getImports() {
|
|||
const ret = getObject(arg0) == getObject(arg1);
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
||||
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
||||
};
|
||||
imports.wbg.__wbg_instanceof_ArrayBuffer_e5e48f4762c5610b = function(arg0) {
|
||||
let result;
|
||||
try {
|
||||
|
@ -496,6 +504,10 @@ function getImports() {
|
|||
const ret = Object.is(getObject(arg0), getObject(arg1));
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbg_new_0b9bfdd97583284e = function() {
|
||||
const ret = new Object();
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbg_toString_7be108a12ef03bc2 = function(arg0) {
|
||||
const ret = getObject(arg0).toString();
|
||||
return addHeapObject(ret);
|
||||
|
@ -586,8 +598,8 @@ imports.wbg.__wbindgen_memory = function() {
|
|||
const ret = wasm.memory;
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper5093 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 316, __wbg_adapter_28);
|
||||
imports.wbg.__wbindgen_closure_wrapper5161 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 322, __wbg_adapter_28);
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
|
||||
|
@ -625,7 +637,7 @@ function initSync(module) {
|
|||
|
||||
async function init(input) {
|
||||
if (typeof input === 'undefined') {
|
||||
input = new URL('tauri-sys-test-ui-f3731bf7a986379f_bg.wasm', import.meta.url);
|
||||
input = new URL('tauri-sys-test-ui-94e40ba9adfa8fe6_bg.wasm', import.meta.url);
|
||||
}
|
||||
const imports = getImports();
|
||||
|
BIN
examples/test/dist/tauri-sys-test-ui-94e40ba9adfa8fe6_bg.wasm
vendored
Normal file
BIN
examples/test/dist/tauri-sys-test-ui-94e40ba9adfa8fe6_bg.wasm
vendored
Normal file
Binary file not shown.
Binary file not shown.
|
@ -11,12 +11,12 @@ rust-version = "1.57"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "1.1", features = [] }
|
||||
tauri-build = { version = "1.2", features = [] }
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = { version = "1.1", features = ["api-all"] }
|
||||
tauri = { version = "1.2", features = ["api-all"] }
|
||||
|
||||
[features]
|
||||
# by default Tauri runs in production mode
|
||||
|
|
|
@ -25,8 +25,8 @@ pub async fn get_tauri_version() -> anyhow::Result<()> {
|
|||
let version = app::get_tauri_version().await?;
|
||||
|
||||
ensure!(version.major == 1);
|
||||
ensure!(version.minor == 1);
|
||||
ensure!(version.patch == 1);
|
||||
ensure!(version.minor == 2);
|
||||
ensure!(version.patch == 0);
|
||||
ensure!(version.build.is_empty());
|
||||
ensure!(version.pre.is_empty());
|
||||
|
||||
|
|
|
@ -84,5 +84,5 @@ fn main() {
|
|||
});
|
||||
|
||||
#[cfg(feature = "ci")]
|
||||
tauri_sys::process::exit(0);
|
||||
wasm_bindgen_futures::spawn_local(async { tauri_sys::process::exit(0).await; });
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
pub fn exit(exit_code: u32) -> ! {
|
||||
inner::exit(exit_code);
|
||||
pub async fn exit(exit_code: u32) -> ! {
|
||||
inner::exit(exit_code).await;
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
|
@ -8,11 +8,11 @@ pub fn relaunch() {
|
|||
}
|
||||
|
||||
mod inner {
|
||||
use wasm_bindgen::prelude::wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen(module = "/src/process.js")]
|
||||
extern "C" {
|
||||
pub fn exit(exitCode: u32);
|
||||
pub async fn exit(exitCode: u32);
|
||||
pub fn relaunch();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue