Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(tutorial): add rust tutorial including openssl example #1155

Merged
merged 11 commits into from
Apr 15, 2024

Conversation

ruben-arts
Copy link
Contributor

Showing how pixi can help even when an amazing tool like cargo exists

@ruben-arts
Copy link
Contributor Author

Also tested it on my windows machine.

@ruben-arts
Copy link
Contributor Author

@nichmor Would you give this tutorial a go?

@nichmor
Copy link
Contributor

nichmor commented Apr 12, 2024

@nichmor Would you give this tutorial a go?

yes, sure!

@ruben-arts ruben-arts requested a review from nichmor April 12, 2024 12:28
docs/tutorials/rust.md Outdated Show resolved Hide resolved
docs/tutorials/rust.md Outdated Show resolved Hide resolved
docs/tutorials/rust.md Outdated Show resolved Hide resolved
docs/tutorials/rust.md Outdated Show resolved Hide resolved
docs/tutorials/rust.md Show resolved Hide resolved
docs/tutorials/rust.md Outdated Show resolved Hide resolved
docs/tutorials/rust.md Outdated Show resolved Hide resolved
docs/tutorials/rust.md Show resolved Hide resolved
description = "Add a short description here"
authors = ["User Name <user.name@email.url>"]
channels = ["conda-forge"]
platforms = ["linux-64"]
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add a comment that platforms will differ depends on your machine ( to not create confusion )

pixi add rust
```

This will add the `rust` package to your `pixi.toml` file.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add a comment from where it will add

ruben-arts and others added 8 commits April 12, 2024 16:05
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
Copy link
Contributor

@nichmor nichmor left a comment

Choose a reason for hiding this comment

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

Amazing work! ❤️

pixi add rust
```

This will add the `rust` package to your `pixi.toml` file.
Copy link
Contributor

Choose a reason for hiding this comment

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

also maybe we can add something like:

This will add the rust package to your pixi.toml file under [dependencies]

## Add a `cargo` project
As you now have rust installed, you can create a `cargo` project in your `pixi` project.
```shell
pixi run cargo init
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add here maybe as a note which will briefly explain how pixi run works so it would be clear for a novice user why we write
pixi run cargo init

installing `pkg-config`.
...
```
You can fix this with pixi:
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can write something like this:
You can fix this by adding necessary dependencies for building git2

Compiling my_rust_project v0.1.0 (/my_rust_project)
Finished dev [unoptimized + debuginfo] target(s) in 7.44s
Running `target/debug/my_rust_project`
```
Copy link
Contributor

@nichmor nichmor Apr 12, 2024

Choose a reason for hiding this comment

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

Maybe we can write a small outro? like conclusion or some small push for user to discover other commands

something like:

As a small exercise you can add clippy as dependency
add cargo fmt as a task.

Also another crazy idea and you can totally ignore it:

maybe we can add a call to action for our users to share completion of this tutorial on twitter / linkedin?

something like:

You can share a completion of this tutorial within our amazing community! Post it on linkedin or twitter with #pixi #prefix.dev and share your thoughts!

Copy link
Contributor

@nichmor nichmor left a comment

Choose a reason for hiding this comment

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

I like it!

@ruben-arts ruben-arts merged commit 82e20a8 into prefix-dev:main Apr 15, 2024
5 checks passed
@ruben-arts ruben-arts deleted the docs/tutorial_rust_openssl branch April 15, 2024 08:24
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.

3 participants