Rust 'did you know': cargo shorthands

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

I just alias all my commands with bash to make it easier to type. Instead of "cargo run" I type "cargo-run-bash-alias-zsh"

brukts
Автор

You should have called this "cargo shorts".

andrejsk
Автор

Wow. A video from your car? It's like you're an influencer now. 😄

ovidiu_nl
Автор

As others have mentioned, you can alias all these commands as "cbr" for "cargo build --release" and so on. Though I would prefer a Neuralink interface, so I could invoke Cargo commands with thoughts or, even better, with unconscious urges, so that when the thought reaches consciousness, the project is already built.

bytefu
Автор

And then there's also "-r" for "--release".

And if you define yourself an alias for "cargo" (I used "c"), things can become really nice and concise… "c r -r".

steffahn
Автор

This 2 letter saving is going to change my life

i.
Автор

This new Crust of Rust format is a little too long winded for my taste :)

PS: Not sure if you have seen the news about fish working on a Rust port, but a video on porting existing codebases to Rust could be interesting (And as a fish user, you could use the fish proposal as a case study... Side effect might include a bump in fish users and contributors :p)

ghassangedeonachi
Автор

incredible. you saved me so much time.

betterinbooks
Автор

The up-and-down arrows are quite handy to

davidvernon
Автор

Hey this video will definitely do well in tiktok!

luthandyka
Автор

Right, you also could alias `cargo` to `c` and go 3 characters per evokation

valeratrades
Автор

I know i can do it, but I often forgot lol

rifdifirebolt
Автор

Someone needs to make a PR that every once in a while let’s the user know after their command output that there’s an alias :P

maboesanman
Автор

Yes, I know it through your channel ❤

xuankunzheng
Автор

Yes I did. But I wish I found out earlier than I did.

arcaneminded
Автор

I did it this way:

# .bash_aliases
alias cr='cargo r'
alias crr='cargo r --release'
alias cb='cargo b'
alias cbr='cargo b --release'

P.S. I am aware that name conflicts are possible.

AlexanderBorodulya
Автор

I have these as abbreviation in fish config.

nrishinghanandaroy
Автор

I just press F5 to run my currently selected run configuration.

KevinDay
Автор

I used cargo watch

Cargo watch -c -q -X 'fmt' -X 'test' -X 'run'

This command do everything for me

midewestmond
Автор

'cargo update' is, I guess, an exception. 'cargo u' doesn't work.

decimatech