mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-11 07:55:34 +03:00
chore(project) rename to tauri (#15)
This commit is contained in:
parent
de8cdefc96
commit
01de6b51b6
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -1,6 +1,6 @@
|
||||
# Quasar Contributing Guide
|
||||
|
||||
Hi! We, the maintainers, are really excited that you are interested in contributing to Quasar Proton. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
|
||||
Hi! We, the maintainers, are really excited that you are interested in contributing to Quasar Tauri. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
|
||||
|
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve Proton
|
||||
about: Create a report to help us improve Tauri
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
@ -32,7 +32,7 @@ Browsers:
|
||||
iOS:
|
||||
Android:
|
||||
Electron:
|
||||
Proton Binding:
|
||||
Tauri Binding:
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
2
.github/ISSUE_TEMPLATE/docs-report.md
vendored
2
.github/ISSUE_TEMPLATE/docs-report.md
vendored
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Docs report
|
||||
about: Create a report to help us improve Proton docs
|
||||
about: Create a report to help us improve Tauri docs
|
||||
title: "[docs]"
|
||||
labels: docs
|
||||
assignees: ''
|
||||
|
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for Proton
|
||||
about: Suggest an idea for Tauri
|
||||
title: ''
|
||||
labels: feature request
|
||||
assignees: ''
|
||||
|
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,6 +1,6 @@
|
||||
<!--
|
||||
Please make sure to read the Pull Request Guidelines:
|
||||
https://github.com/quasarframework/proton/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
|
||||
https://github.com/quasarframework/tauri/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
|
||||
-->
|
||||
|
||||
<!-- PULL REQUEST TEMPLATE -->
|
||||
@ -32,7 +32,7 @@ If yes, please describe the impact and migration path for existing applications
|
||||
|
||||
- [ ] It's submitted to the `dev` branch and _not_ the `master` branch
|
||||
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix: #xxx[,#xxx]`, where "xxx" is the issue number)
|
||||
- [ ] Any necessary documentation has been added or updated [in the docs](https://github.com/quasarframework/proton/tree/dev/docs) (for faster update click on "Suggest an edit on GitHub" at bottom of page) or explained in the PR's description.
|
||||
- [ ] Any necessary documentation has been added or updated [in the docs](https://github.com/quasarframework/tauri/tree/dev/docs) (for faster update click on "Suggest an edit on GitHub" at bottom of page) or explained in the PR's description.
|
||||
|
||||
If adding a **new feature**, the PR's description includes:
|
||||
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)
|
||||
|
42
README.md
42
README.md
@ -1,14 +1,14 @@
|
||||
# quasar-proton [WIP]
|
||||
# quasar-tauri [WIP]
|
||||
## A fresh take on creating cross-platform apps.
|
||||
[![official icon](https://img.shields.io/badge/Quasar%201.0-Official-blue.svg)](https://quasar.dev)
|
||||
[![status](https://img.shields.io/badge/Status-Internal%20Review-yellow.svg)](https://github.com/quasarframework/quasar/tree/proton)
|
||||
[![version](https://img.shields.io/badge/Version-unreleased-yellow.svg)](https://github.com/quasarframework/quasar/tree/proton) <img align="right" src="https://cdn.quasar.dev/logo/proton/proton-logo-240x240.png">
|
||||
[![status](https://img.shields.io/badge/Status-Internal%20Review-yellow.svg)](https://github.com/quasarframework/quasar/tree/tauri)
|
||||
[![version](https://img.shields.io/badge/Version-unreleased-yellow.svg)](https://github.com/quasarframework/quasar/tree/tauri) <img align="right" src="https://cdn.quasar.dev/logo/tauri/tauri-logo-240x240.png">
|
||||
|
||||
[![Join the chat at https://chat.quasar.dev](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://chat.quasar.dev)
|
||||
<a href="https://forum.quasar.dev" target="_blank"><img src="https://img.shields.io/badge/community-forum-brightgreen.svg"></a>
|
||||
[![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation)
|
||||
|
||||
**Proton** brings a mode to build Quasar Apps that creates tiny, blazing
|
||||
**Tauri** brings a mode to build Quasar Apps that creates tiny, blazing
|
||||
fast binaries for all major desktop platforms. In Quasar's
|
||||
[neverending quest](https://quasar.dev/introduction-to-quasar#Why-Quasar%3F)
|
||||
for performance and security, the core team is proud to offer an
|
||||
@ -16,15 +16,15 @@ alternative to Electron.
|
||||
|
||||
Whether you are just starting out making apps for your meetup or
|
||||
regularly crunch terabyte datasets, we are absolutely confident that
|
||||
you will love using Proton as much as we love making and maintaining it.
|
||||
you will love using Tauri as much as we love making and maintaining it.
|
||||
|
||||
## Who Proton is For
|
||||
Anyone who can create a Quasar app can use Proton, as it is *merely* a new
|
||||
## Who Tauri is For
|
||||
Anyone who can create a Quasar app can use Tauri, as it is *merely* a new
|
||||
build target. All components and plugins (suitable for Native Desktop) can
|
||||
be used. For the User Interface, nothing has changed, except you will
|
||||
probably notice that everything seems much faster.
|
||||
|
||||
Because of the way Proton has been built and can be extended, developers
|
||||
Because of the way Tauri has been built and can be extended, developers
|
||||
are able to interface not only with the entire Rust ecosystem, but also
|
||||
with many other programming languages. Being freed of the heaviest thing
|
||||
in the universe and the many shortcomings of server-side Javascript
|
||||
@ -33,23 +33,23 @@ applications that need the purebred power, agility and community
|
||||
acceptance of a low-level language.
|
||||
|
||||
We expect to witness an entire new class of applications being built with
|
||||
Quasar Proton. From a simple calender to locally crunching massive realtime
|
||||
Quasar Tauri. From a simple calender to locally crunching massive realtime
|
||||
feeds at particle colliders or even mesh-network based distributed message-
|
||||
passing ecosystems - the bar has been raised and gauntlet thrown.
|
||||
|
||||
What will you make?
|
||||
|
||||
## 5 Reasons to consider Proton
|
||||
- **BUNDLE SIZE** of a vanilla Proton app is less than 3 MB - about 140 MB smaller than what you get with Electron.
|
||||
## 5 Reasons to consider Tauri
|
||||
- **BUNDLE SIZE** of a vanilla Tauri app is less than 3 MB - about 140 MB smaller than what you get with Electron.
|
||||
- **MEMORY FOOTPRINT** is less than half of the size of an Electron app built from the same codebase.
|
||||
- **SECURITY** is Proton's biggest priority and we take it so seriously that we innovate to keep hackers out of your apps.
|
||||
- **SECURITY** is Tauri's biggest priority and we take it so seriously that we innovate to keep hackers out of your apps.
|
||||
- **RELIABILITY** of the underlying code base is why critical libraries have been forked and will be perpetually maintained.
|
||||
- **FLOSS** licensing is regretfully impossible with downstream Chromium consumers, like Electron.
|
||||
|
||||
## Technical Details
|
||||
The user interface in Proton apps currently leverages Cocoa/WebKit on macOS,
|
||||
The user interface in Tauri apps currently leverages Cocoa/WebKit on macOS,
|
||||
gtk-webkit2 on Linux and MSHTML (IE10/11) or Webkit via Edge on Windows.
|
||||
**Proton** is based on the MIT licensed prior work known as
|
||||
**Tauri** is based on the MIT licensed prior work known as
|
||||
[webview](https://github.com/zserge/webview).
|
||||
|
||||
The default binding to the underlying webview library currently uses Rust,
|
||||
@ -67,7 +67,7 @@ support with auto-completion and type inspections, an auto-formatter, and
|
||||
more. - [https://www.rust-lang.org/](https://www.rust-lang.org/)
|
||||
|
||||
This combination of power, safety and usability are why we chose Rust to be
|
||||
the default binding for Proton. It is our intention to provide the most safe
|
||||
the default binding for Tauri. It is our intention to provide the most safe
|
||||
and performant native app experience (for devs and app consumers), out of
|
||||
the box.
|
||||
|
||||
@ -123,9 +123,9 @@ you through the process. Here is a bit of a status report.
|
||||
- [x] OTP salting of function names and messages
|
||||
- [x] CSP Injection
|
||||
|
||||
### Comparison between Proton 1 and Electron 5
|
||||
### Comparison between Tauri 1 and Electron 5
|
||||
|
||||
| | Proton | Electron |
|
||||
| | Tauri | Electron |
|
||||
|--|--------|----------|
|
||||
| Binary Size MacOS | 2.6 MB | 147.7 MB |
|
||||
| Memory Consumption MacOS | 13 MB | 34.1 MB |
|
||||
@ -197,10 +197,10 @@ before making a pull request. If you have a Quasar-related
|
||||
project/component/tool, add it with a pull request to
|
||||
[this curated list](https://github.com/quasarframework/quasar-awesome)!
|
||||
|
||||
Thank you to all the people who already <a href="https://github.com/quasarframework/proton/graphs/contributors">contributed to Proton</a>!
|
||||
Thank you to all the people who already <a href="https://github.com/quasarframework/tauri/graphs/contributors">contributed to Tauri</a>!
|
||||
|
||||
## Semver
|
||||
quasarframework/proton is following [Semantic Versioning 2.0](https://semver.org/).
|
||||
quasarframework/tauri is following [Semantic Versioning 2.0](https://semver.org/).
|
||||
|
||||
## Licenses
|
||||
Code: (c) 2015- 2019 - Daniel Thompson-Yvetot, Razvan Stoenescu, Lucas Nogueira, Boscop, Serge Zaitsev, George Burton and contributors.
|
||||
@ -208,7 +208,7 @@ Code: (c) 2015- 2019 - Daniel Thompson-Yvetot, Razvan Stoenescu, Lucas Nogueira,
|
||||
MIT or MIT/Apache where applicable.
|
||||
|
||||
Logo: CC-BY-NC-ND
|
||||
- Original Proton Logo Design by [Daniel Thompson-Yvetot](https://github.com/nothingismagick)
|
||||
- Original Tauri Logo Design by [Daniel Thompson-Yvetot](https://github.com/nothingismagick)
|
||||
- Based on the prior work by [Emanuele Bertoldi](https://github.com/zuck)
|
||||
|
||||
Name: The proper name of this project is "Quasar Proton", and is to be used in all citations.
|
||||
Name: The proper name of this project is "Quasar Tauri", and is to be used in all citations.
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Package proton implements Go bindings to Proton UI.
|
||||
// Package tauri implements Go bindings to Tauri UI.
|
||||
//
|
||||
// Bindings closely repeat the C APIs and include both, a simplified
|
||||
// single-function API to just open a full-screen webview window, and a more
|
||||
@ -8,7 +8,7 @@
|
||||
// The library uses gtk-webkit, Cocoa/Webkit and MSHTML (IE8..11) as a browser
|
||||
// engine and supports Linux, MacOS and Windows 7..10 respectively.
|
||||
//
|
||||
package proton
|
||||
package tauri
|
||||
|
||||
/*
|
||||
#cgo linux openbsd freebsd CFLAGS: -DWEBVIEW_GTK=1
|
@ -1,4 +1,4 @@
|
||||
package proton
|
||||
package tauri
|
||||
|
||||
import (
|
||||
"image"
|
6
bindings/rust/Cargo.lock
generated
6
bindings/rust/Cargo.lock
generated
@ -34,7 +34,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proton-sys"
|
||||
name = "tauri-sys"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -43,11 +43,11 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proton-ui"
|
||||
name = "tauri-ui"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"boxfnonce 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proton-sys 1.0.0",
|
||||
"tauri-sys 1.0.0",
|
||||
"serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1,18 +1,18 @@
|
||||
[package]
|
||||
name = "proton-ui"
|
||||
name = "tauri-ui"
|
||||
version = "1.0.0"
|
||||
authors = ["Lucas Fernandes Gonçalves Nogueira <lucas@quasar.dev>", "Daniel Thompson-Yvetot <denjell@quasar.dev>"]
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/quasarframework/proton"
|
||||
description = "Rust bindings for proton, a toolchain for building more secure native apps that have tiny binaries and are very fast."
|
||||
repository = "https://github.com/quasarframework/tauri"
|
||||
description = "Rust bindings for tauri, a toolchain for building more secure native apps that have tiny binaries and are very fast."
|
||||
keywords = ["quasar", "web", "gui", "desktop", "webkit"]
|
||||
categories = ["quasar", "gui", "web-programming", "api-bindings", "rendering", "visualization"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
urlencoding = "1.0"
|
||||
proton-sys = { path = "proton-sys", version = "1.0.0" }
|
||||
tauri-sys = { path = "tauri-sys", version = "1.0.0" }
|
||||
boxfnonce = "0.1"
|
||||
|
||||
[features]
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
extern crate proton_sys as ffi;
|
||||
extern crate tauri_sys as ffi;
|
||||
|
||||
|
||||
mod color;
|
||||
|
@ -14,7 +14,7 @@ version = "0.3.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "proton-sys"
|
||||
name = "tauri-sys"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
@ -1,18 +1,18 @@
|
||||
[package]
|
||||
name = "proton-sys"
|
||||
name = "tauri-sys"
|
||||
version = "1.0.0"
|
||||
authors = ["Boscop", "Lucas Fernandes Gonçalves Nogueira <lucas@quasar.dev>", "Daniel Thompson-Yvetot <denjell@quasar.dev>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/quasarframework/proton"
|
||||
description = "Rust native ffi bindings for proton UI"
|
||||
repository = "https://github.com/quasarframework/tauri"
|
||||
description = "Rust native ffi bindings for tauri UI"
|
||||
keywords = ["quasar", "web", "gui", "desktop", "webkit"]
|
||||
categories = ["quasar", "gui", "web-programming", "api-bindings", "rendering", "visualization"]
|
||||
build = "build.rs"
|
||||
links = "proton"
|
||||
links = "tauri"
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
name = "proton_sys"
|
||||
name = "tauri_sys"
|
||||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
@ -1,13 +1,13 @@
|
||||
use std::{env, path::PathBuf};
|
||||
|
||||
fn main() {
|
||||
let proton_path = PathBuf::from("../../../ui");
|
||||
let tauri_path = PathBuf::from("../../../ui");
|
||||
|
||||
let mut build = cc::Build::new();
|
||||
|
||||
build
|
||||
.include(&proton_path)
|
||||
.file("proton.c")
|
||||
.include(&tauri_path)
|
||||
.file("tauri.c")
|
||||
.flag_if_supported("-std=c11")
|
||||
.flag_if_supported("-w");
|
||||
|
||||
@ -45,5 +45,5 @@ fn main() {
|
||||
panic!("unsupported target");
|
||||
}
|
||||
|
||||
build.compile("proton");
|
||||
build.compile("tauri");
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
//! Raw FFI bindings to proton UI.
|
||||
//! Raw FFI bindings to tauri UI.
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
@ -1,5 +1,5 @@
|
||||
#define WEBVIEW_IMPLEMENTATION
|
||||
#include "proton.h"
|
||||
#include "tauri.h"
|
||||
|
||||
void wrapper_webview_free(struct webview* w) {
|
||||
free(w);
|
10
lib/rust/Cargo.lock
generated
10
lib/rust/Cargo.lock
generated
@ -897,7 +897,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proton"
|
||||
name = "tauri"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -907,7 +907,7 @@ dependencies = [
|
||||
"ignore 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pbr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proton-ui 1.0.0",
|
||||
"tauri-ui 1.0.0",
|
||||
"rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"reqwest 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -923,7 +923,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proton-sys"
|
||||
name = "tauri-sys"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -932,11 +932,11 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proton-ui"
|
||||
name = "tauri-ui"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"boxfnonce 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proton-sys 1.0.0",
|
||||
"tauri-sys 1.0.0",
|
||||
"urlencoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "proton"
|
||||
name = "tauri"
|
||||
version = "1.0.0"
|
||||
authors = ["Lucas Fernandes Gonçalves Nogueira <lucas@quasar.dev>", "Daniel Thompson-Yvetot <denjell@quasar.dev>"]
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
proton-ui = { path = "../../bindings/rust" }
|
||||
tauri-ui = { path = "../../bindings/rust" }
|
||||
serde_json = "1.0.39"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
mod cmd;
|
||||
|
||||
use proton_ui::WebView;
|
||||
use tauri_ui::WebView;
|
||||
|
||||
#[allow(unused_variables)]
|
||||
pub fn handler<T: 'static>(webview: &mut WebView<'_, T>, arg: &str) -> bool {
|
||||
|
@ -1,4 +1,4 @@
|
||||
use proton_ui::WebView;
|
||||
use tauri_ui::WebView;
|
||||
|
||||
use std::process::{Child, Command, Stdio};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
use proton_ui::Handle;
|
||||
use tauri_ui::Handle;
|
||||
use std::boxed::Box;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
@ -1,4 +1,4 @@
|
||||
use proton_ui::WebView;
|
||||
use tauri_ui::WebView;
|
||||
|
||||
use crate::dir;
|
||||
use crate::execute_promise;
|
||||
|
@ -22,7 +22,7 @@ pub mod tcp;
|
||||
pub mod updater;
|
||||
pub mod version;
|
||||
|
||||
use proton_ui::WebView;
|
||||
use tauri_ui::WebView;
|
||||
|
||||
use threadpool::ThreadPool;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
use proton_ui::WebView;
|
||||
use tauri_ui::WebView;
|
||||
use std::sync::Mutex;
|
||||
use uuid::Uuid;
|
||||
|
||||
|
@ -128,7 +128,7 @@ impl UpdateBuilder {
|
||||
/// The path provided should be:
|
||||
///
|
||||
/// ```
|
||||
/// # use proton::updater::Update;
|
||||
/// # use tauri::updater::Update;
|
||||
/// # fn run() -> Result<(), Box<::std::error::Error>> {
|
||||
/// Update::configure()?
|
||||
/// .bin_path_in_archive("bin/myapp")
|
||||
|
10
package.json
10
package.json
@ -1,21 +1,21 @@
|
||||
{
|
||||
"name": "@quasar/proton",
|
||||
"name": "@quasar/tauri",
|
||||
"version": "1.0.0-alpha.1",
|
||||
"description": "Multi-binding collection of libraries and templates for building Proton",
|
||||
"description": "Multi-binding collection of libraries and templates for building Tauri",
|
||||
"main": "templates/index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/quasarframework/proton.git"
|
||||
"url": "git+https://github.com/quasarframework/tauri.git"
|
||||
},
|
||||
"author": "Quasar Framework",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/quasarframework/proton/issues"
|
||||
"url": "https://github.com/quasarframework/tauri/issues"
|
||||
},
|
||||
"homepage": "https://github.com/quasarframework/proton#readme",
|
||||
"homepage": "https://github.com/quasarframework/tauri#readme",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "app"
|
||||
version = "0.1.0"
|
||||
description = "A Quasar Proton App"
|
||||
description = "A Quasar Tauri App"
|
||||
author = []
|
||||
license = ""
|
||||
repository = ""
|
||||
@ -11,7 +11,7 @@ include = ["data"]
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
proton-ui = { path = "../../proton/bindings/rust" }
|
||||
tauri-ui = { path = "../../tauri/bindings/rust" }
|
||||
serde_json = "1.0.39"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
@ -19,7 +19,7 @@ tiny_http = "0.6"
|
||||
clap = {version = "2.33", features = ["yaml"]}
|
||||
phf = "0.7.21"
|
||||
includedir = "0.5.0"
|
||||
proton = { path = "../../proton/lib/rust" }
|
||||
tauri = { path = "../../tauri/lib/rust" }
|
||||
|
||||
[build-dependencies]
|
||||
includedir_codegen = "0.5.0"
|
||||
|
@ -1,8 +1,8 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate clap;
|
||||
extern crate proton;
|
||||
extern crate proton_ui;
|
||||
extern crate tauri;
|
||||
extern crate tauri_ui;
|
||||
extern crate serde_json;
|
||||
|
||||
#[cfg(not(feature = "dev"))]
|
||||
@ -34,7 +34,7 @@ fn main() {
|
||||
#[cfg(feature = "updater")]
|
||||
{
|
||||
thread::spawn(|| {
|
||||
proton::command::spawn_relative_command(
|
||||
tauri::command::spawn_relative_command(
|
||||
"updater".to_string(),
|
||||
Vec::new(),
|
||||
std::process::Stdio::inherit(),
|
||||
@ -60,7 +60,7 @@ fn main() {
|
||||
);
|
||||
|
||||
let matches = app.get_matches();
|
||||
content = proton_ui::Content::Url(matches.value_of("url").unwrap().to_owned());
|
||||
content = tauri_ui::Content::Url(matches.value_of("url").unwrap().to_owned());
|
||||
debug = true;
|
||||
}
|
||||
|
||||
@ -80,28 +80,28 @@ fn main() {
|
||||
styles = inline_style(include_str!("../target/compiled-web/css/app.css")),
|
||||
scripts = inline_script(include_str!("../target/compiled-web/js/app.js")),
|
||||
);
|
||||
content = proton_ui::Content::Html(html);
|
||||
content = tauri_ui::Content::Html(html);
|
||||
}
|
||||
#[cfg(not(feature = "serverless"))]
|
||||
{
|
||||
if let Some(available_port) = proton::tcp::get_available_port() {
|
||||
if let Some(available_port) = tauri::tcp::get_available_port() {
|
||||
_server_url = format!("{}:{}", "127.0.0.1", available_port);
|
||||
content = proton_ui::Content::Url(format!("http://{}", _server_url));
|
||||
content = tauri_ui::Content::Url(format!("http://{}", _server_url));
|
||||
} else {
|
||||
panic!("Could not find an open port");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let webview = proton_ui::builder()
|
||||
let webview = tauri_ui::builder()
|
||||
.title("MyApp - Serverless")
|
||||
.size(800, 600) // TODO:Resolution is fixed right now, change this later to be dynamic
|
||||
.resizable(true)
|
||||
.debug(debug)
|
||||
.user_data(())
|
||||
.invoke_handler(|webview, arg| {
|
||||
// leave this as is to use the proton API from your JS code
|
||||
if !proton::api::handler(webview, arg) {
|
||||
// leave this as is to use the tauri API from your JS code
|
||||
if !tauri::api::handler(webview, arg) {
|
||||
use cmd::Cmd::*;
|
||||
match serde_json::from_str(arg) {
|
||||
Err(_) => {}
|
||||
@ -130,7 +130,7 @@ fn main() {
|
||||
.eval(&format!(
|
||||
"window['{queue}'] = [];
|
||||
window['{fn}'] = function (payload, salt, ignoreQueue) {{
|
||||
window.proton.promisified({{
|
||||
window.tauri.promisified({{
|
||||
cmd: 'validateSalt',
|
||||
salt
|
||||
}}).then(function () {{
|
||||
@ -151,9 +151,9 @@ fn main() {
|
||||
}}
|
||||
}})
|
||||
}}",
|
||||
fn = proton::event::emit_function_name(),
|
||||
listeners = proton::event::event_listeners_object_name(),
|
||||
queue = proton::event::event_queue_object_name()
|
||||
fn = tauri::event::emit_function_name(),
|
||||
listeners = tauri::event::event_listeners_object_name(),
|
||||
queue = tauri::event::event_queue_object_name()
|
||||
))
|
||||
.unwrap();
|
||||
|
||||
|
@ -1,27 +1,27 @@
|
||||
extern crate proton;
|
||||
extern crate tauri;
|
||||
extern crate serde_derive;
|
||||
extern crate serde_json;
|
||||
|
||||
use crate::proton::process::{ProcessExt, Signal, SystemExt};
|
||||
use crate::tauri::process::{ProcessExt, Signal, SystemExt};
|
||||
|
||||
fn update() -> Result<(), String> {
|
||||
let target = proton::platform::target_triple().map_err(|_| "Could not determine target")?;
|
||||
let github_release = proton::updater::github::get_latest_release("jaemk", "self_update")
|
||||
let target = tauri::platform::target_triple().map_err(|_| "Could not determine target")?;
|
||||
let github_release = tauri::updater::github::get_latest_release("jaemk", "self_update")
|
||||
.map_err(|_| "Could not fetch latest release")?;
|
||||
match github_release.asset_for(&target) {
|
||||
Some(github_release_asset) => {
|
||||
let release = proton::updater::Release {
|
||||
let release = tauri::updater::Release {
|
||||
version: github_release.tag.trim_start_matches('v').to_string(),
|
||||
download_url: github_release_asset.download_url,
|
||||
asset_name: github_release_asset.name,
|
||||
};
|
||||
|
||||
let status = proton::updater::Update::configure()
|
||||
let status = tauri::updater::Update::configure()
|
||||
.unwrap()
|
||||
.release(release)
|
||||
.bin_path_in_archive("github")
|
||||
.bin_name("app")
|
||||
.bin_install_path(&proton::command::command_path("app".to_string()).unwrap())
|
||||
.bin_install_path(&tauri::command::command_path("app".to_string()).unwrap())
|
||||
.show_download_progress(true)
|
||||
.current_version(env!("CARGO_PKG_VERSION"))
|
||||
.build()
|
||||
@ -31,10 +31,10 @@ fn update() -> Result<(), String> {
|
||||
|
||||
println!("found release: {}", status.version());
|
||||
|
||||
/*let tmp_dir = proton::dir::with_temp_dir(|dir| {
|
||||
/*let tmp_dir = tauri::dir::with_temp_dir(|dir| {
|
||||
let file_path = dir.path().join("my-temporary-note.pdf");
|
||||
let mut tmp_archive = std::fs::File::create(file_path).unwrap();
|
||||
proton::http::download(&"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf".to_string(), &mut tmp_archive, true).unwrap();
|
||||
tauri::http::download(&"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf".to_string(), &mut tmp_archive, true).unwrap();
|
||||
});*/
|
||||
|
||||
Ok(())
|
||||
@ -44,8 +44,8 @@ fn update() -> Result<(), String> {
|
||||
}
|
||||
|
||||
fn restart_app(app_command: String) -> Result<(), String> {
|
||||
let mut system = proton::process::System::new();
|
||||
let parent_process = proton::process::get_parent_process(&mut system)
|
||||
let mut system = tauri::process::System::new();
|
||||
let parent_process = tauri::process::get_parent_process(&mut system)
|
||||
.map_err(|_| "Could not determine parent process")?;
|
||||
if parent_process.name() == "app" {
|
||||
parent_process.kill(Signal::Kill);
|
||||
@ -58,7 +58,7 @@ fn restart_app(app_command: String) -> Result<(), String> {
|
||||
}
|
||||
|
||||
fn run_updater() -> Result<(), String> {
|
||||
let app_command = proton::command::relative_command("app".to_string())
|
||||
let app_command = tauri::command::relative_command("app".to_string())
|
||||
.map_err(|_| "Could not determine app path")?;
|
||||
update()?;
|
||||
restart_app(app_command)?;
|
||||
|
@ -123,7 +123,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cargo-proton-bundle"
|
||||
name = "cargo-tauri-bundle"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"ar 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "cargo-proton-bundle"
|
||||
name = "cargo-tauri-bundle"
|
||||
version = "1.0.0"
|
||||
authors = ["George Burton <burtonageo@gmail.com>", "Lucas Fernandes Gonçalves Nogueira <lucas@quasar.dev>", "Daniel Thompson-Yvetot <denjell@quasar.dev>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
keywords = ["bundle", "cargo", "proton", "quasar"]
|
||||
repository = "https://github.com/quasarframework/proton"
|
||||
description = "Wrap rust executables in OS-specific app bundles for Quasar-Proton"
|
||||
keywords = ["bundle", "cargo", "tauri", "quasar"]
|
||||
repository = "https://github.com/quasarframework/tauri"
|
||||
description = "Wrap rust executables in OS-specific app bundles for Quasar-Tauri"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
@ -1,23 +1,23 @@
|
||||
# Cargo Proton Bundle
|
||||
# Cargo Tauri Bundle
|
||||
|
||||
Wrap Rust executables in OS-specific app bundles
|
||||
|
||||
## About
|
||||
|
||||
`cargo proton-bundle` is a tool used to generate installers or app bundles for GUI
|
||||
`cargo tauri-bundle` is a tool used to generate installers or app bundles for GUI
|
||||
executables built with `cargo`. It can create `.app` bundles for Mac OS X and
|
||||
iOS, `.deb` packages for Linux, and `.msi` installers for Windows (note however
|
||||
that iOS and Windows support is still experimental). Support for creating
|
||||
`.rpm` packages (for Linux) and `.apk` packages (for Android) is still pending.
|
||||
|
||||
To install `cargo proton-bundle`, run `cargo install cargo-proton-bundle`. This will add the most recent version of `cargo-bundle`
|
||||
To install `cargo tauri-bundle`, run `cargo install cargo-tauri-bundle`. This will add the most recent version of `cargo-bundle`
|
||||
published to [crates.io](https://crates.io/crates/cargo-bundle) as a subcommand to your default `cargo` installation.
|
||||
|
||||
To start using `cargo proton-bundle`, add a `[package.metadata.bundle]` section to your project's `Cargo.toml` file. This
|
||||
To start using `cargo tauri-bundle`, add a `[package.metadata.bundle]` section to your project's `Cargo.toml` file. This
|
||||
section describes various attributes of the generated bundle, such as its name, icon, description, copyright, as well
|
||||
as any packaging scripts you need to generate extra data. The full manifest format is described below.
|
||||
|
||||
To build a bundle for the OS you're on, simply run `cargo proton-bundle` in your
|
||||
To build a bundle for the OS you're on, simply run `cargo tauri-bundle` in your
|
||||
project's directory (where the `Cargo.toml` is placed). If you would like to
|
||||
bundle a release build, you must add the `--release` flag to your call. To
|
||||
cross-compile and bundle an application for another OS, add an appropriate
|
||||
@ -120,7 +120,7 @@ osx_frameworks = ["SDL2"]
|
||||
|
||||
## Contributing
|
||||
|
||||
`cargo-proton-bundle` has ambitions to be inclusive project and welcome contributions from anyone. Please abide by the Rust
|
||||
`cargo-tauri-bundle` has ambitions to be inclusive project and welcome contributions from anyone. Please abide by the Rust
|
||||
code of conduct.
|
||||
|
||||
## Status
|
@ -72,13 +72,13 @@ fn run() -> crate::Result<()> {
|
||||
.iter()
|
||||
.map(PackageType::short_name)
|
||||
.collect();
|
||||
let m = App::new("cargo-proton-bundle")
|
||||
let m = App::new("cargo-tauri-bundle")
|
||||
.version(format!("v{}", crate_version!()).as_str())
|
||||
.bin_name("cargo")
|
||||
.setting(AppSettings::GlobalVersion)
|
||||
.setting(AppSettings::SubcommandRequired)
|
||||
.subcommand(
|
||||
SubCommand::with_name("proton-bundle")
|
||||
SubCommand::with_name("tauri-bundle")
|
||||
.author("George Burton <burtonageo@gmail.com>, Lucas Fernandes Gonçalves Nogueira <lucas@quasar.dev>, Daniel Thompson-Yvetot <denjell@quasar.dev>")
|
||||
.about("Bundle Rust executables into OS bundles")
|
||||
.setting(AppSettings::DisableVersion)
|
||||
@ -124,7 +124,7 @@ fn run() -> crate::Result<()> {
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
if let Some(m) = m.subcommand_matches("proton-bundle") {
|
||||
if let Some(m) = m.subcommand_matches("tauri-bundle") {
|
||||
let output_paths = env::current_dir()
|
||||
.map_err(From::from)
|
||||
.and_then(|d| Settings::new(d, m))
|
@ -17,16 +17,16 @@ else()
|
||||
set(WEBVIEW_LIBS ${GTK3_LIBRARIES} ${WEBKIT2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
add_library(proton ${CMAKE_CURRENT_BINARY_DIR}/proton.c)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/proton.c "#define WEBVIEW_IMPLEMENTATION\n#include <proton.h>")
|
||||
target_include_directories(proton PUBLIC ${PROJECT_SOURCE_DIR} ${WEBVIEW_COMPILE_INCS})
|
||||
target_compile_definitions(proton PUBLIC ${WEBVIEW_COMPILE_DEFS})
|
||||
target_compile_options(proton PRIVATE ${WEBVIEW_COMPILE_OPTS})
|
||||
target_link_libraries(proton ${WEBVIEW_LIBS})
|
||||
add_library(tauri ${CMAKE_CURRENT_BINARY_DIR}/tauri.c)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tauri.c "#define WEBVIEW_IMPLEMENTATION\n#include <tauri.h>")
|
||||
target_include_directories(tauri PUBLIC ${PROJECT_SOURCE_DIR} ${WEBVIEW_COMPILE_INCS})
|
||||
target_compile_definitions(tauri PUBLIC ${WEBVIEW_COMPILE_DEFS})
|
||||
target_compile_options(tauri PRIVATE ${WEBVIEW_COMPILE_OPTS})
|
||||
target_link_libraries(tauri ${WEBVIEW_LIBS})
|
||||
|
||||
add_executable(proton_test WIN32 MACOSX_BUNDLE proton_test.cc)
|
||||
set_target_properties(proton_test PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES CXX_EXTENSIONS NO)
|
||||
add_executable(tauri_test WIN32 MACOSX_BUNDLE tauri_test.cc)
|
||||
set_target_properties(tauri_test PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES CXX_EXTENSIONS NO)
|
||||
find_package(Threads)
|
||||
target_link_libraries(proton_test PRIVATE proton ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries(tauri_test PRIVATE tauri ${CMAKE_THREAD_LIBS_INIT})
|
||||
enable_testing ()
|
||||
add_test(NAME proton_test COMMAND proton_test)
|
||||
add_test(NAME tauri_test COMMAND tauri_test)
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
#define WEBVIEW_IMPLEMENTATION
|
||||
#include "proton.h"
|
||||
#include "tauri.h"
|
||||
|
||||
extern "C" void webview_dispatch_proxy(struct webview *w, void *arg) {
|
||||
(*static_cast<std::function<void(struct webview *)> *>(arg))(w);
|
Loading…
Reference in New Issue
Block a user