Skip to content

Commit

Permalink
Quickstart tutorial (#107)
Browse files Browse the repository at this point in the history
I've resized my ambition: we won't have a bootcamp for now, but the
quickstart tutorial is a bit meatier than I had initially planned.
The quickstart itself is pretty much "done" with this PR: now it's a
matter to add safeguards to make sure that code examples do not go
stale, but that'll be the job of a separate PR.
  • Loading branch information
LukeMathWalker authored Dec 6, 2023
1 parent d5b598e commit 5b3bec2
Show file tree
Hide file tree
Showing 18 changed files with 679 additions and 43 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: ".github/workflows"
schedule:
interval: "daily"
22 changes: 22 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Links (Fail Fast)

on:
pull_request:
branches:
- main

jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
sparse-checkout: |
.github
docs
- name: Link Checker
uses: lycheeverse/lychee-action@v1
with:
fail: true
args: --base . --exclude-loopback --require-https --verbose --no-progress docs
3 changes: 1 addition & 2 deletions docs/getting_started/.pages
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
nav:
- "Installation": index.md
- learning_paths.md
- quickstart.md
- bootcamp.md
- quickstart.md
Empty file removed docs/getting_started/bootcamp.md
Empty file.
21 changes: 21 additions & 0 deletions docs/getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@ rustup --version && \

If there are no errors, you're good to go!
### Nightly toolchain
To perform code generation, Pavex relies on an unstable Rust feature:
[`rustdoc-json`](https://github.com/rust-lang/rust/issues/76578).
As a consequence, Pavex requires you to have the Rust `nightly` toolchain installed.
You can add `nightly` to your toolchain by running:
```bash
rustup toolchain install nightly
```
Once `nightly` is installed, add the `rust-docs-json` component:
```bash
rustup component add --toolchain nightly rust-docs-json
```
**Pavex will never use `nightly` to compile your application**.
All the code you'll be running (in production or otherwise) will be compiled with the stable toolchain.
Pavex relies on `nightly` to perform code generation and compile-time reflection—nothing else.

## Pavex

Pavex provides a command-line interface to scaffold new projects and work with existing ones.
Expand Down
17 changes: 3 additions & 14 deletions docs/getting_started/learning_paths.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Learning Paths

Each person has a different background and different goals.
To accommodate this diversity, we provide multiple learning paths for Pavex, each tailored to a specific audience.
To accommodate this diversity, this section provides multiple learning paths for Pavex, each tailored to a specific audience.

## I'm new to Rust

Expand All @@ -26,16 +26,5 @@ Once you feel comfortable enough with the language, you can start learning about

## I know some Rust, but I'm new to Pavex

If you're already familiar with Rust, you can start learning about Pavex right away.
We provide two different introductions to the framework: [Quickstart](quickstart.md) and [Bootcamp](bootcamp.md).

Would you rather get your hands dirty than reading documentation upfront?
Follow the [Quickstart tutorial](quickstart.md)!
It covers the basics of the framework,
but it doesn't go into much detail—just enough to get you started in 10 minutes or so.
You'll then have to figure things out on your own, leveraging Pavex's error messages and consulting the
[documentation](../documentation/index.md) on a need-to-know basis.

If you prefer a more guided tour, you should check out the [Bootcamp](bootcamp.md) tutorial instead.
It walks you through the process of building a simple API with Pavex, explaining the core concepts of the framework
along the way.
If you're already familiar with Rust, you can start learning about Pavex right away: head over to our
[Quickstart tutorial](quickstart.md) to learn about the core concepts of the framework.
Loading

0 comments on commit 5b3bec2

Please sign in to comment.