Skip to content

Commit 45a7a11

Browse files
authored
feat(core): add tauri-wry crate (#1756)
1 parent f190f11 commit 45a7a11

File tree

19 files changed

+433
-276
lines changed

19 files changed

+433
-276
lines changed

.changes/config.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,16 @@
220220
"dependencies": [
221221
"tauri-utils"
222222
],
223-
"postversion": "node ../../.scripts/sync-prerelease.js ${ release.type }"
223+
"postversion": "node ../../.scripts/sync-prerelease.js ${ pkg.pkg } ${ release.type }"
224+
},
225+
"tauri-runtime-wry": {
226+
"path": "./core/tauri-runtime-wry",
227+
"manager": "rust",
228+
"dependencies": [
229+
"tauri-utils",
230+
"tauri-runtime"
231+
],
232+
"postversion": "node ../../.scripts/sync-prerelease.js ${ pkg.pkg } ${ release.type }"
224233
},
225234
"tauri-codegen": {
226235
"path": "./core/tauri-codegen",
@@ -250,7 +259,8 @@
250259
"dependencies": [
251260
"tauri-macros",
252261
"tauri-utils",
253-
"tauri-runtime"
262+
"tauri-runtime",
263+
"tauri-runtime-wry"
254264
],
255265
"postversion": "node ../../.scripts/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
256266
},
@@ -285,4 +295,4 @@
285295
"manager": "javascript"
286296
}
287297
}
288-
}
298+
}

.changes/runtime-crate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
"tauri-runtime": patch
2+
"tauri-runtime": minor
33
"tauri": patch
44
---
55

.changes/tauri-wry.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri": patch
3+
"tauri-runtime-wry": minor
4+
---
5+
6+
`tauri-runtime-wry` initial release.

.scripts/sync-prerelease.js

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,28 @@ keep the `tauri-release` crate version without the `beta` or `beta-rc` suffix.
1010

1111
const { readFileSync, writeFileSync } = require("fs")
1212

13-
const runtimeManifestPath = '../../core/tauri-runtime/Cargo.toml'
14-
const dependencyManifestPaths = ['../../core/tauri/Cargo.toml']
15-
const changelogPath = '../../core/tauri-runtime/CHANGELOG.md'
13+
const packageNickname = process.argv[2]
14+
const bump = process.argv[3]
1615

17-
const bump = process.argv[2]
16+
let manifestPath
17+
let dependencyManifestPaths
18+
let changelogPath
1819

19-
let runtimeManifest = readFileSync(runtimeManifestPath, "utf-8")
20-
runtimeManifest = runtimeManifest.replace(/version = "(\d+\.\d+\.\d+)-[^0-9\.]+\.0"/, 'version = "$1"')
21-
writeFileSync(runtimeManifestPath, runtimeManifest)
20+
if (packageNickname === 'tauri-runtime') {
21+
manifestPath = '../../core/tauri-runtime/Cargo.toml'
22+
dependencyManifestPaths = ['../../core/tauri/Cargo.toml', '../../core/tauri-runtime-wry/Cargo.toml']
23+
changelogPath = '../../core/tauri-runtime/CHANGELOG.md'
24+
} else if (packageNickname === 'tauri-runtime-wry') {
25+
manifestPath = '../../core/tauri-runtime-wry/Cargo.toml'
26+
dependencyManifestPaths = ['../../core/tauri/Cargo.toml']
27+
changelogPath = '../../core/tauri-runtime-wry/CHANGELOG.md'
28+
} else {
29+
throw new Error(`Unexpected package ${packageNickname}`)
30+
}
31+
32+
let manifest = readFileSync(manifestPath, "utf-8")
33+
manifest = manifest.replace(/version = "(\d+\.\d+\.\d+)-[^0-9\.]+\.0"/, 'version = "$1"')
34+
writeFileSync(manifestPath, manifest)
2235

2336
let changelog = readFileSync(changelogPath, "utf-8")
2437
changelog = changelog.replace(/(\d+\.\d+\.\d+)-[^0-9\.]+\.0/, '$1')

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ members = [
33
# core
44
"core/tauri",
55
"core/tauri-runtime",
6+
"core/tauri-runtime-wry",
67
"core/tauri-macros",
78
"core/tauri-utils",
89
"core/tauri-build",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Copyright {20\d{2}(-20\d{2})?} Tauri Programme within The Commons Conservancy
2+
// SPDX-License-Identifier: Apache-2.0
3+
// SPDX-License-Identifier: MIT

core/tauri-runtime-wry/Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "tauri-runtime-wry"
3+
version = "0.0.0"
4+
authors = [ "Tauri Programme within The Commons Conservancy" ]
5+
categories = [ "gui", "web-programming" ]
6+
license = "Apache-2.0 OR MIT"
7+
homepage = "https://tauri.studio"
8+
repository = "https://github.com/tauri-apps/tauri"
9+
description = "Wry bindings to the Tauri runtime"
10+
edition = "2018"
11+
12+
[dependencies]
13+
wry = { git = "https://github.com/tauri-apps/wry", rev = "6bc97aff525644b83a3a00537316c46d7afb985b" }
14+
tauri-runtime = { version = "0.0.0", path = "../tauri-runtime" }
15+
tauri-utils = { version = "1.0.0-beta-rc.1", path = "../tauri-utils" }
16+
image = "0.23"
17+
uuid = { version = "0.8.2", features = [ "v4" ] }

0 commit comments

Comments
 (0)