Skip to content

doc: Document the project creation process#99

Merged
9names merged 2 commits intorp-rs:mainfrom
ithinuel:improve-doc
May 16, 2025
Merged

doc: Document the project creation process#99
9names merged 2 commits intorp-rs:mainfrom
ithinuel:improve-doc

Conversation

@ithinuel
Copy link
Member

This is an attempt at clarifying the possible confusion reported by @moritztim.

Fixes #90

Copy link
Contributor

@moritztim moritztim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Assuming you tested these instructions, that should definitely clear it up.

README.md Outdated
Comment on lines +74 to +97
### Using `cargo-generate`

```sh
cargo generate --git https://github.com/rp-rs/rp2040-project-template
```

Follow the wizard 🪄 and enjoy your new project.

### Downloading as a zip file or using GitHub's template support

Once you have a copy of the code apply the following:
- Remove `debug_probe.md`.
- Remove the `cargo-generate` directory.
- Remote/edit `README.md`.
- If using vscode update `.vscode/launch.json`;
Else: remove this file.
- Edit `Cargo.toml` & adjust according to your project (especially its name).
- Edit `.cargo/config.tml` to select your favorite runner.

### Downloading this repository as a zip or generating with github's template

From GitHub's UI, download this repository as a zip file and remove the `cargo-generate` directory.

### Generate with `cargo-generate`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you left an unfinished version of your changes in tho. I merged them for you:

Suggested change
### Using `cargo-generate`
```sh
cargo generate --git https://github.com/rp-rs/rp2040-project-template
```
Follow the wizard 🪄 and enjoy your new project.
### Downloading as a zip file or using GitHub's template support
Once you have a copy of the code apply the following:
- Remove `debug_probe.md`.
- Remove the `cargo-generate` directory.
- Remote/edit `README.md`.
- If using vscode update `.vscode/launch.json`;
Else: remove this file.
- Edit `Cargo.toml` & adjust according to your project (especially its name).
- Edit `.cargo/config.tml` to select your favorite runner.
### Downloading this repository as a zip or generating with github's template
From GitHub's UI, download this repository as a zip file and remove the `cargo-generate` directory.
### Generate with `cargo-generate`
### Generate with `cargo-generate`
```sh
cargo generate --git https://github.com/rp-rs/rp2040-project-template
```
Follow the wizard 🪄 and enjoy your new project.
### Downloading as a zip file or using GitHub's template support
From GitHub's UI, download this repository as a zip file and remove the `cargo-generate` directory.
Once you have a copy of the code apply the following:
- Remove `debug_probe.md`.
- Remove the `cargo-generate` directory.
- Remote/edit `README.md`.
- If using vscode update `.vscode/launch.json`;
Else: remove this file.
- Edit `Cargo.toml` & adjust according to your project (especially its name).
- Edit `.cargo/config.tml` to select your favorite runner.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's a good catch thank you!

I reworded the intro to the Manual section 👍

@ithinuel
Copy link
Member Author

I didn't "test" following the instructions. They are a human-readable version of the content of https://github.com/rp-rs/rp2040-project-template/blob/main/cargo-generate/remove_rprs.rhai (+/- some less relevant operations).

Copy link
Contributor

@moritztim moritztim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

### Using `cargo-generate`

```sh
cargo generate --git https://github.com/rp-rs/rp2040-project-template
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer the brief syntax that assumes github hosting, in case folks are typing this out instead of copy-pasting.

Suggested change
cargo generate --git https://github.com/rp-rs/rp2040-project-template
cargo generate rp-rs/rp2040-project-template

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we have installation instructions for everything else, but not for cargo generate.

Co-authored-by: 9names <60134748+9names@users.noreply.github.com>
@9names 9names merged commit 920d2cc into rp-rs:main May 16, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatible Template implementation options

3 participants