Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c193f1d
feat: add tauri CLI page
JonasKruckenberg May 31, 2022
8f44c1c
feat: add getting started pages for vanilla and vite
JonasKruckenberg Jun 11, 2022
39a5e07
Merge remote-tracking branch 'origin/dev' into feat/guides/getting-st…
lorenzolewis Jun 11, 2022
438676f
Improvements to html-css-js guide
lorenzolewis Jun 11, 2022
edf7955
Fix broken links
lorenzolewis Jun 11, 2022
e409a18
Update _tauri-init.md
JonasKruckenberg Jun 12, 2022
437e9d4
Update html-css-js.md
JonasKruckenberg Jun 12, 2022
bbe2302
Extract tauri init into a separate fragment
lorenzolewis Jun 12, 2022
223e11d
Update title
lorenzolewis Jun 12, 2022
7ac932e
Add autogenerated quick start
lorenzolewis Jun 12, 2022
3527e8d
Add descriptions to pages
lorenzolewis Jun 12, 2022
2fa3d26
Add a readme page for the Features section
lorenzolewis Jun 12, 2022
68d1b4c
Conditionallly show globalTauri
lorenzolewis Jun 12, 2022
c223d17
update getting started
JonasKruckenberg Jun 14, 2022
df49305
Add line break
lorenzolewis Jun 14, 2022
ab06c35
Adjust line breaks
lorenzolewis Jun 14, 2022
c53e1b2
Make sure my commits are signed
lorenzolewis Jun 14, 2022
daf650f
Test commit signing
lorenzolewis Jun 14, 2022
7a754a4
Fix indent
lorenzolewis Jun 14, 2022
8c07f3c
various fixes
FabianLars Jun 14, 2022
f23f9c9
Update Tauri CLI Title
lorenzolewis Jun 15, 2022
8cf867b
Rename quick-start to setup
lorenzolewis Jun 15, 2022
94cc75a
Add pagination
lorenzolewis Jun 15, 2022
abea567
Enable architecture and getting-start for i18n
lorenzolewis Jun 15, 2022
82f8470
add screenshots
JonasKruckenberg Jun 15, 2022
5b24cc3
fix typos
JonasKruckenberg Jun 15, 2022
e79cfb9
expand short tauri intro
JonasKruckenberg Jun 15, 2022
7dd2362
configure beforeDev and beforeBuild commands
JonasKruckenberg Jun 15, 2022
bc9ff6c
fix typo
JonasKruckenberg Jun 15, 2022
f2bd631
downscale images
JonasKruckenberg Jun 15, 2022
4066372
swap `global` command for `pnpm`
JonasKruckenberg Jun 15, 2022
c8ea150
Add in ideal image plugin
lorenzolewis Jun 15, 2022
8853dfa
Merge branch 'feat/guides/getting-started' of https://github.com/taur…
lorenzolewis Jun 15, 2022
530626d
Revert "downscale images"
JonasKruckenberg Jun 15, 2022
070a7ef
Merge branch 'dev' into feat/guides/getting-started
lorenzolewis Jun 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

.vscode
.vscode
examples
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ Copyright (c) 2020-2022 Tauri Programme within The Commons Conservancy
[typescript]: https://github.com/tauri-apps/tauri/tree/dev/tooling/api
[rust]: https://github.com/tauri-apps/tauri/tree/dev/core/tauri
[contributing guide]: ./.github/CONTRIBUTING.md

11 changes: 5 additions & 6 deletions crowdin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ files:
[
/docs/.templates,
/docs/api,
/docs/guides/faq.md,
/docs/guides/architecture,
/docs/guides/building,
/docs/guides/debugging,
/docs/guides/architecture/recipes,
/docs/guides/development,
/docs/guides/debugging,
/docs/guides/testing,
/docs/guides/building,
/docs/guides/distribution,
/docs/guides/features,
/docs/guides/getting-started,
/docs/guides/testing,
/docs/guides/faq.md,
]
6 changes: 6 additions & 0 deletions docs/guides/features/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import DocCardList from '@theme/DocCardList';
import {useCurrentSidebarCategory} from '@docusaurus/theme-common';

# Features

<DocCardList items={useCurrentSidebarCategory().items}/>
2 changes: 1 addition & 1 deletion docs/guides/features/icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tauri ships with a default iconset based on its logo. This is probably NOT what

## Usage

```shell
```console
npx @tauri-apps/tauricon --help

Description
Expand Down
193 changes: 0 additions & 193 deletions docs/guides/getting-started/beginning-tutorial.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/guides/getting-started/prerequisites.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
sidebar_position: 1
pagination_next: guides/getting-started/beginning-tutorial
---

import Tabs from '@theme/Tabs';
Expand Down
25 changes: 25 additions & 0 deletions docs/guides/getting-started/setup/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
sidebar_position: 3
---

import DocCardList from '@theme/DocCardList'
import { useCurrentSidebarCategory } from '@docusaurus/theme-common'

# Quick Start

Tauri is compatible with **almost every frontend stack**. Select yours and get started!

<DocCardList items={useCurrentSidebarCategory().items} />

:::info Missing your favorite framework?

If you miss your favorite frontend framework or build tool, we're always looking for Getting Started guides! Read our [contributing] guidelines and help us out!

:::

## Don't know where to start?

If you're unfamiliar with web development or have no favorite frontend stack you might find the [HTML/CSS/JS] guide the most helpful. It guides you through getting started with the most minimal frontend setup possible: A single HTML file.

[html/css/js]: ./html-css-js.mdx
[contributing]: https://github.com/tauri-apps/tauri/blob/dev/.github/CONTRIBUTING.md
28 changes: 28 additions & 0 deletions docs/guides/getting-started/setup/_commands.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Tauri lets you enhance your Frontend with native capabilities. We call these [Commands][command], essentially Rust functions that you can call from your frontend JavaScript. This enables you to handle heavy processing or calls to the OS in much more performant Rust code.

Let's make a simple example:

```rust
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}!", name)
}
```

A Command is just like any regular Rust function, with the addition of the `#[tauri::command]` attribute macro that allows your function to communicate with the JavaScript context.

Lastly, we also need to tell Tauri about our newly created command so that it can route calls accordingly. This is done with the combination of the `.invoke_handler()` function and the `generate_handler![]` macro you can see below:

```rust
fn main() {
tauri::Builder::default()
// highlight-next-line
.invoke_handler(tauri::generate_handler![greet])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```

Now we're ready to call your Command from the JavaScript frontend!

[command]: ../../features/command.md
42 changes: 42 additions & 0 deletions docs/guides/getting-started/setup/_intro.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'

Tauri is a framework to build desktop applications with any Front-end framework and a Rust core. Each app consists of two parts:

1. Rust binary that creates the windows and exposes native functionality to those windows
2. Frontend of your choice that produces the User Interface inside the window

In the following, we will first scaffold the Frontend, then set up the Rust project and lastly show you how to communicate between the two.

:::tip `create-tauri-app`

The easiest way to scaffold a new project is the [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) utility. It will ask you a series of questions and quickly bootstrap a Tauri project for you to begin developing with. It has support for vanilla HTML/CSS/JavaScript but also many frontend frameworks like React, Vue, or Svelte.

<Tabs groupId="package-manager">
<TabItem value="npx" label="npx" default>

```shell
npx create-tauri-app
```

</TabItem>
<TabItem value="yarn" label="yarn">

```shell
yarn create tauri-app
```

</TabItem>
<TabItem value="pnpm" label="pnpm">

```shell
pnpm create tauri-app
```

</TabItem>
</Tabs>
:::

[cargo]: https://doc.rust-lang.org/cargo/
[prerequisites]: ../prerequisites.md
[tauri-cli]: ../tauri-cli.md
Loading