First Steps ๐ฃโ
In this section described basic steps to start programming with Python or Rust.
Python ๐โ
Installation ๐โ
- Just download
.exefile; - Install it;
- Add python executable to
PATH(should be option for it); - Use to "install for all users";
- Download archive;
- Extract it;
- Go go extracted folder;
-
Use these commands:
./configure- prepare for installation;make- extract / download / check files;make test- to rust CPython tests before installation;make altinstall- to install new version together with already installed, without change the default one;
Info
All commands can require
sudoaccess (but it depends).Danger
If you need override your current python enterpreter with new one, use can use
make install.
Virtual Environment ๐ฎโจโ
For Python ๐ projects are best practices to use different Python versions and separate installed versions for dependencies.
Here is another good option to manage virtual environments, called Poetry:
Poetry Poetry - Managing environments
Code Formatters ๐งพโ
Python has no standard auto formatters included to it ๐ข.
Several of common community formatters is:
black - code formatter; isort - imports formatter;
Rust ๐ฆโ
Installation ๐โ
To install Rust it's better to use the official method via rustup (this is Rust toolchain).
Virtual Environment ๐ฎโจโ
Rust ๐ฆ no need to manage virtual environment in such way like a Python, because every package
(called Crate in Rust) is separated from others and it builds at compile time.
To manage dependencies and crates in Rust toolchain - exists Cargo.
Code Formatters ๐งพโ
Rust has standard formatter called rustfmt.
You can call it directly from Cargo inside your crate:
Or from rustfmt by one file: