Skip to content

Commit

Permalink
refactor: rename this crate to cargo-mobile2 (#219)
Browse files Browse the repository at this point in the history
* refactor: rename this crate to `cargo-mobile2`

* use tauri-apps fork

* Update config.json

* actually rename
  • Loading branch information
amrbashir authored Oct 4, 2023
1 parent 094c1e4 commit 5f17581
Show file tree
Hide file tree
Showing 26 changed files with 116 additions and 153 deletions.
4 changes: 2 additions & 2 deletions .changes/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"gitSiteUrl": "https://github.com/tauri-apps/tauri-mobile/",
"gitSiteUrl": "https://github.com/tauri-apps/cargo-mobile2/",
"pkgManagers": {
"rust": {
"version": true,
Expand All @@ -8,7 +8,7 @@
}
},
"packages": {
"tauri-mobile": {
"cargo-mobile2": {
"path": ".",
"postversion": ["cargo check"],
"manager": "rust"
Expand Down
5 changes: 5 additions & 0 deletions .changes/rename-cargo-mobile2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cargo-mobile2": "minor"
---

Rename this crate to `cargo-mobile2`
14 changes: 6 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
---
name: Bug report
about: Create a report to help us improve tauri-mobile
title: ''
labels: 'type: bug'
assignees: ''

about: Create a report to help us improve cargo-mobile2
title: ""
labels: "type: bug"
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is. If you are using tauri-cli, please consider open an issue in Tauri main repo first.

**Steps To Reproduce**
Steps to reproduce the behavior. It **must** use tauri-mobile itself and wry template directly instead of tauri-cli.
Steps to reproduce the behavior. It **must** use cargo-mobile2 itself and wry template directly instead of tauri-cli.

**Expected behavior**
A clear and concise description of what you expected to happen.
Expand All @@ -27,10 +26,9 @@ Rustc:
(if you build with specific commit, please list it as well)

**Would you want to assign yourself to resolve this bug?**

- [ ] Yes
- [ ] No

**Additional context**
Add any other context about the problem here.


10 changes: 4 additions & 6 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for Tauri-mobile
title: ''
about: Suggest an idea for cargo-mobile2
title: ""
labels: feature request
assignees: ''

assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand All @@ -17,10 +16,9 @@ A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.

**Would you want to assign yourself to implement this feature?**

- [ ] Yes
- [ ] No

**Additional context**
Add any other context or screenshots about the feature request here.


8 changes: 5 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Please make sure to read the Pull Request Guidelines: https://github.com/tauri-a
-->

### What kind of change does this PR introduce?

<!-- Check at least one. If you are introducing a new binding, you must reference an issue where this binding has been proposed, discussed and approved by the maintainers. -->

- [ ] Bugfix
Expand All @@ -16,16 +17,17 @@ Please make sure to read the Pull Request Guidelines: https://github.com/tauri-a
- [ ] Other, please describe:

### Does this PR introduce a breaking change?

<!-- If yes, please describe the impact and migration path for existing applications in an attached issue. -->

- [ ] Yes
- [ ] No

### Checklist
- [ ] This PR will resolve #___
- [ ] A change file is added if any packages will require a version bump due to this PR per [the instructions in the readme](https://github.com/tauri-apps/tauri-mobile/blob/dev/.changes/readme.md).

- [ ] This PR will resolve #\_\_\_
- [ ] A change file is added if any packages will require a version bump due to this PR per [the instructions in the readme](https://github.com/tauri-apps/cargo-mobile2/blob/dev/.changes/readme.md).
- [ ] I have added a convincing reason for adding this feature, if necessary
- [ ] It can be built on all targets and pass CI/CD.

### Other information

2 changes: 1 addition & 1 deletion .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
createRelease: true
- name: Create Pull Request With Versions Bumped
id: cpr
uses: peter-evans/create-pull-request@v3
uses: tauri-apps/create-pull-request@v3
if: steps.covector.outputs.commandRan == 'version'
with:
title: "Publish New Versions"
Expand Down
84 changes: 42 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "tauri-mobile"
name = "cargo-mobile2"
version = "0.5.4"
authors = [
"Tauri Programme within The Commons Conservancy",
Expand All @@ -8,8 +8,8 @@ authors = [
]
edition = "2021"
description = "Rust on mobile made easy!"
documentation = "https://docs.rs/tauri-mobile"
repository = "https://github.com/tauri-apps/tauri-mobile"
documentation = "https://docs.rs/cargo-mobile2"
repository = "https://github.com/tauri-apps/cargo-mobile2"
readme = "README.md"
keywords = [ "cargo", "mobile", "ios", "android", "tauri" ]
categories = [ "development-tools::cargo-plugins" ]
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
# ❗⚠️ WARNING - DEPRECATION NOTICE ❗⚠️

THIS CRATE HAS BEEN DEPRECATED, AND HAS BEEN RENAMED TO `cargo-mobile2`

# tauri-mobile
# cargo-mobile2

> _The answer to "how do I use Rust on iOS and Android?"_
>
> cargo-mobile takes care of generating Xcode and Android Studio project files, building and running on device, generating project boilerplate, and a few other things!
This project is a fork of [cargo-mobile](https://github.com/BrainiumLLC/cargo-mobile/). Tauri uses it as a library dependency instead of using its CLI directly. For more information, please visit [Tauri's mobile guide](https://next--tauri.netlify.app/next/mobile/).

In the meantime, tauri-mobile contains the template of wry, please follow [wry's instruction](https://github.com/tauri-apps/wry#android--ios) if you want to use with it.
In the meantime, cargo-mobile2 contains the template of wry, please follow [wry's instruction](https://github.com/tauri-apps/wry#android--ios) if you want to use with it.

## Installation

The build will probably take a bit, so feel free to go get a snack or something.

```bash
cargo install --git https://github.com/tauri-apps/tauri-mobile
cargo install --git https://github.com/tauri-apps/cargo-mobile2
```

tauri-mobile is currently supported on macOS, Linux and Windows. Note that it's not possible to target iOS on platforms other than macOS! You'll still get to target Android either way.
cargo-mobile2 is currently supported on macOS, Linux and Windows. Note that it's not possible to target iOS on platforms other than macOS! You'll still get to target Android either way.

You'll need to have Xcode and the Android SDK/NDK installed. Some of this will ideally be automated in the future, or at least we'll provide a helpful guide and diagnostics.

Expand Down
2 changes: 1 addition & 1 deletion fast-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function copyy {
cp "$cargoTargetDir\debug\cargo-$args.exe" "$cargoHome\bin\cargo-$args.exe"
}

cargo build -p tauri-mobile
cargo build -p cargo-mobile2
copyy "android"
copyy "apple"
copyy "mobile"
Expand Down
2 changes: 1 addition & 1 deletion fast-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function copy {
cp $cargoTargetDir/debug/cargo-$1 $cargoHome/bin/cargo-$1
}

cargo build -p tauri-mobile $@
cargo build -p cargo-mobile2 $@
copy "android"
copy "apple"
copy "mobile"
Expand Down
4 changes: 2 additions & 2 deletions src/bicycle/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl Bicycle {
///
/// # Examples
/// ```
/// use tauri_mobile::bicycle::{
/// use cargo_mobile2::bicycle::{
/// handlebars::{handlebars_helper, HelperDef},
/// Bicycle, EscapeFn, JsonMap,
/// };
Expand Down Expand Up @@ -192,7 +192,7 @@ impl Bicycle {
///
/// # Examples
/// ```
/// use tauri_mobile::bicycle::Bicycle;
/// use cargo_mobile2::bicycle::Bicycle;
///
/// let bike = Bicycle::default();
/// let rendered = bike.render("Hello {{name}}!", |map| {
Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo-android.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg(feature = "cli")]
#![forbid(unsafe_code)]

use tauri_mobile::{
use cargo_mobile2::{
android::{cli::Input, NAME},
util::cli::exec,
};
Expand Down
4 changes: 2 additions & 2 deletions src/bin/cargo-apple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#[cfg(target_os = "macos")]
fn main() {
use tauri_mobile::{
use cargo_mobile2::{
apple::{cli::Input, NAME},
util::cli::exec,
};
Expand All @@ -12,7 +12,7 @@ fn main() {

#[cfg(not(target_os = "macos"))]
fn main() {
use tauri_mobile::util::cli::{Exit, Report};
use cargo_mobile2::util::cli::{Exit, Report};
Exit::main(|_wrapper| {
Err(Exit::Report(Report::error(
"`cargo-apple` can only be used on macOS",
Expand Down
Loading

0 comments on commit 5f17581

Please sign in to comment.