Skip to content

Commit 0c691f4

Browse files
feat(core): Use Wry custom protocol instead of embedded server (#1296)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
1 parent c16a273 commit 0c691f4

File tree

30 files changed

+240
-650
lines changed

30 files changed

+240
-650
lines changed

.changes/custom-protocol.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": minor
3+
---
4+
5+
Replaces the embedded-server mode with Wry's custom protocol feature. This allows assets to be transferred to the webview directly, instead of through a localhost server.

.github/workflows/core-lint-fmt.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
runs-on: ubuntu-latest
6363
strategy:
6464
matrix:
65-
feature: [embedded-server, api-all]
65+
feature: [custom-protocol, api-all]
6666

6767
steps:
6868
- uses: actions/checkout@v2

cli/core/Cargo.lock

+72-53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/core/config_definition.rs

-18
Original file line numberDiff line numberDiff line change
@@ -188,22 +188,6 @@ pub enum Port {
188188
Random,
189189
}
190190

191-
/// The embeddedServer configuration object.
192-
#[skip_serializing_none]
193-
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
194-
#[serde(rename_all = "camelCase", deny_unknown_fields)]
195-
pub struct EmbeddedServerConfig {
196-
/// The embedded server host.
197-
pub host: Option<String>,
198-
/// The embedded server port.
199-
/// If it's `random`, we'll generate one at runtime.
200-
pub port: Option<Port>,
201-
202-
/// The base path of the embedded server.
203-
/// The path should always start and end in a forward slash, which the deserializer will ensure
204-
pub public_path: Option<String>,
205-
}
206-
207191
/// The window configuration object.
208192
#[skip_serializing_none]
209193
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
@@ -498,8 +482,6 @@ pub struct TauriConfig {
498482
pub windows: Vec<WindowConfig>,
499483
/// The CLI configuration.
500484
pub cli: Option<CliConfig>,
501-
#[serde(default)]
502-
pub embedded_server: EmbeddedServerConfig,
503485
/// The bundler configuration.
504486
#[serde(default)]
505487
pub bundle: BundleConfig,

0 commit comments

Comments
 (0)