- Rust ���������� ��� linux
- Getting started
- Quickly set up a Rust development environment and write a small app!
- Installing Rust
- Rustup: the Rust installer and version management tool
- Windows Subsystem for Linux
- Is Rust up to date?
- Cargo: the Rust build tool and package manager
- Other tools
- Generating a new project
- Adding dependencies
- A small Rust application
- Learn more!
- Who’s this crab, Ferris?
- Install Rust
- Using rustup (Recommended)
- Windows Subsystem for Linux
- Notes about Rust installation
- Getting started
- Windows considerations
- Toolchain management with rustup
- Configuring the PATH environment variable
- Uninstall Rust
- Other installation methods
- Установка Rust
- Используя rustup (рекомендуется)
- Windows Subsystem for Linux
- Примечания об установке Rust
- Начало работы
- Особенности Windows
- Управление инструментами с rustup
- Настройка переменной окружения PATH
- Удалить Rust
- Другие методы установки
Rust ���������� ��� linux
1,399 | уникальных посетителей |
6 | добавили в избранное |
Lutris is a graphical tool that can be used to launch games using wine. You can follow the installation instructions for your distro here [lutris.net]
This game doesn’t work well with OpenGL on Linux, so is better to run the game with Vulkan and the new DXVK (See the Requirements [github.com] ). In order to complete our lutris installation you need to install:
- Graphics Drivers and Vulkan support
Check this page [github.com] to know how to install graphics drivers and vulkan for your distro.
Check this page [github.com] to know how to get wine and dependencies for your distro (the staging version of wine is the more updated).
You can check your Vulkan installation with the command vulkaninfo or vkcube. If there are no errors everything should work
Start lutris and install the Wine Steam runner.
To show the Manage Runners window click near «Runners», then scroll down and install the Wine Steam runner:
After the installation of the runner select «Configure Runner» and make sure the option «Enable DXVK/VKD3D» is enabled
The steam interface with wine is very glitchy, you can optionally show only the mini version of the library of steam by clicking «Show advanced options» and adding the following text inside the «Arguments» field:
(Thank you TermNCR for the tip!)
Click the Save button and close the window.
Inside the main window of Lutris, click the Wine Steam Tab and select the Add Game option
Insert a Name and select the runner «Wine Steam», then move to the «Game options» tab and insert the Application ID of Rust: 252490
Enable the option «Do not launch game, only open Steam» if you want to show the Steam interface and don’t start the game directly (after the installation you can uncheck this for a faster startup of the game)
You can now click the Save button
If you have already downloaded Rust with Proton on Steam for Linux, you can copy the Rust game folder from the proton installation to the lutris/wine installation.
From your home directory, press on the keyboard CTRL+H to show hidden files, then go to the directory
and copy the Rust folder.
Paste the Rust folder inside your steam lutris/wine installation usually located from your home directory to
(Create steamapps and common folders if they don’t exist)
When you will start the installation of Rust, Steam will first check existing files and then download the missing ones.
Select Rust from Lutris and press Play.
Login into steam and search Rust from your library to install the game (if you are using the mini library mode of steam, use the View menu to see the Download progress). After the installation you can start the game from the steam interface.
You can also explore servers without EAC using the steam server browser from the View -> Server Menu.
- Use Borderless window mode, Exclusive mode can give you problems
To reset the game options, if the game doesn’t start, you can try deleting the file client.cfg inside the Rust/cfg game folder
With AMD graphics you can use «Enable ACO shader compiler» option of Lutris to get a more smooth experience
Источник
Getting started
Quickly set up a Rust development environment and write a small app!
Installing Rust
You can try Rust online in the Rust Playground without installing anything on your computer.
Rustup: the Rust installer and version management tool
The primary way that folks install Rust is through a tool called Rustup, which is a Rust installer and version management tool.
It looks like you’re running macOS, Linux, or another Unix-like OS. To download Rustup and install Rust, run the following in your terminal, then follow the on-screen instructions. See «Other Installation Methods» if you are on Windows.
It looks like you’re running Windows. To start using Rust, download the installer, then run the program and follow the onscreen instructions. You may need to install the Visual Studio C++ Build tools when prompted to do so. If you are not on Windows see «Other Installation Methods».
Windows Subsystem for Linux
If you’re a Windows Subsystem for Linux user run the following in your terminal, then follow the on-screen instructions to install Rust.
Rust runs on Windows, Linux, macOS, FreeBSD and NetBSD. If you are on one of these platforms and are seeing this then please report an issue with the following values:
To install Rust, if you are running Unix,
run the following in your terminal, then follow the on-screen instructions.
curl —proto ‘=https’ —tlsv1.2 -sSf https://sh.rustup.rs | sh
If you are running Windows,
download and run rustup‑init.exe then follow the on-screen instructions.
If you are running Windows,
download and run rustup‑init.exe then follow the on-screen instructions.
Is Rust up to date?
Rust updates very frequently. If you have installed Rustup some time ago, chances are your Rust version is out of date. Get the latest version of Rust by running rustup update .
Cargo: the Rust build tool and package manager
When you install Rustup you’ll also get the latest stable version of the Rust build tool and package manager, also known as Cargo. Cargo does lots of things:
- build your project with cargo build
- run your project with cargo run
- test your project with cargo test
- build documentation for your project with cargo doc
- publish a library to crates.io with cargo publish
To test that you have Rust and Cargo installed, you can run this in your terminal of choice:
Other tools
Rust support is available in many editors:
Generating a new project
Let’s write a small application with our new Rust development environment. To start, we’ll use Cargo to make a new project for us. In your terminal of choice run:
cargo new hello-rust
This will generate a new directory called hello-rust with the following files:
Cargo.toml is the manifest file for Rust. It’s where you keep metadata for your project, as well as dependencies.
src/main.rs is where we’ll write our application code.
cargo new generates a «Hello, world!» project for us! We can run this program by moving into the new directory that we made and running this in our terminal:
You should see this in your terminal:
Adding dependencies
Let’s add a dependency to our application. You can find all sorts of libraries on crates.io, the package registry for Rust. In Rust, we often refer to packages as “crates.”
In this project, we’ll use a crate called ferris-says .
In our Cargo.toml file we’ll add this information (that we got from the crate page):
. and Cargo will install our dependency for us.
You’ll see that running this command created a new file for us, Cargo.lock . This file is a log of the exact versions of the dependencies we are using locally.
To use this dependency, we can open main.rs , remove everything that’s in there (it’s just another example), and add this line to it:
This line means that we can now use the say function that the ferris-says crate exports for us.
A small Rust application
Now let’s write a small application with our new dependency. In our main.rs , add the following code:
Once we save that, we can run our application by typing:
Assuming everything went well, you should see your application print this to the screen:
Learn more!
You’re a Rustacean now! Welcome! We’re so glad to have you. When you’re ready, hop over to our Learn page, where you can find lots of books that will help you to continue on your Rust adventure.
Who’s this crab, Ferris?
Ferris is the unofficial mascot of the Rust Community. Many Rust programmers call themselves “Rustaceans,” a play on the word “crustacean.” We refer to Ferris with any pronouns “she,” “he,” “they,” “it,” etc.
Ferris is a name playing off of the adjective, “ferrous,” meaning of or pertaining to iron. Since Rust often forms on iron, it seemed like a fun origin for our mascot’s name!
You can find more images of Ferris on rustacean.net.
Источник
Install Rust
Using rustup (Recommended)
It looks like you’re running macOS, Linux, or another Unix-like OS. To download Rustup and install Rust, run the following in your terminal, then follow the on-screen instructions. See «Other Installation Methods» if you are on Windows.
It looks like you’re running Windows. To start using Rust, download the installer, then run the program and follow the onscreen instructions. You may need to install the Visual Studio C++ Build tools when prompted to do so. If you are not on Windows see «Other Installation Methods».
Windows Subsystem for Linux
If you’re a Windows Subsystem for Linux user run the following in your terminal, then follow the on-screen instructions to install Rust.
Rust runs on Windows, Linux, macOS, FreeBSD and NetBSD. If you are on one of these platforms and are seeing this then please report an issue with the following values:
To install Rust, if you are running Unix,
run the following in your terminal, then follow the on-screen instructions.
curl —proto ‘=https’ —tlsv1.2 -sSf https://sh.rustup.rs | sh
If you are running Windows,
download and run rustup‑init.exe then follow the on-screen instructions.
If you are running Windows,
download and run rustup‑init.exe then follow the on-screen instructions.
Notes about Rust installation
Getting started
If you’re just getting started with Rust and would like a more detailed walk-through, see our getting started page.
Windows considerations
On Windows, Rust additionally requires the C++ build tools for Visual Studio 2013 or later. The easiest way to acquire the build tools is by installing Microsoft Visual C++ Build Tools 2019 which provides just the Visual C++ build tools. Alternately, you can install Visual Studio 2019, Visual Studio 2017, Visual Studio 2015, or Visual Studio 2013 and during install select the “C++ tools.”
For further information about configuring Rust on Windows see the Windows-specific rustup documentation.
Toolchain management with rustup
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. rustup manages these builds in a consistent way on every platform that Rust supports, enabling installation of Rust from the beta and nightly release channels as well as support for additional cross-compilation targets.
If you’ve installed rustup in the past, you can update your installation by running rustup update .
For more information see the rustup documentation.
Configuring the PATH environment variable
In the Rust development environment, all tools are installed to the
/.cargo/bin %USERPROFILE%\.cargo\bin directory, and this is where you will find the Rust toolchain, including rustc , cargo , and rustup .
Accordingly, it is customary for Rust developers to include this directory in their PATH environment variable. During installation rustup will attempt to configure the PATH . Because of differences between platforms, command shells, and bugs in rustup , the modifications to PATH may not take effect until the console is restarted, or the user is logged out, or it may not succeed at all.
If, after installation, running rustc —version in the console fails, this is the most likely reason.
Uninstall Rust
If at any point you would like to uninstall Rust, you can run rustup self uninstall . We’ll miss you though!
Other installation methods
The installation described above, via rustup , is the preferred way to install Rust for most developers. However, Rust can be installed via other methods as well.
Источник
Установка Rust
Используя rustup (рекомендуется)
Кажется у вас запущена macOS, Linux или другая Unix-подобная ОС. Для загрузки Rustup и установки Rust, запустите следующее в вашем терминале и следуйте инструкциям на экране.
Похоже, вы работаете под управлением Windows. Чтобы начать использовать Rust, загрузите установщик, затем запустите программу и следуйте инструкциям на экране. Возможно, Вам потребуется установитьVisual Studio C++ Build tools при появлении соответствующего запроса. Если вы не работаете в Windows, смотрите «другие методы установки».
Windows Subsystem for Linux
Если вы используете Windows Subsystem for Linux, для установки Rust запустите следующее в вашем терминале и затем следуйте инструкциям на экране.
Rust запускается на Windows, Linux, macOS, FreeBSD и NetBSD. Если вы используете одну из этих платформ и видите это, то пожалуйста, сообщите о проблеме и следующих значениях:
Если вы используете Unix, то для установки Rust
запустите в терминале следующую команду и следуйте инструкциям на экране.
curl —proto ‘=https’ —tlsv1.2 -sSf https://sh.rustup.rs | sh
Если у вас запущен Windows,
скачайте и запустите rustup‑init.exe и затем следуйте инструкциям на экране.
Если у вас запущен Windows,
скачайте и запустите rustup‑init.exe, а затем следуйте инструкциям на экране.
Примечания об установке Rust
Начало работы
Если вы только начали работать с Rust и хотите более глубокого погружения, посмотрите страницу о начале работы.
Особенности Windows
На Windows, Rust дополнительно требует инструменты сборки C++ для Visual Studio 2013 или более поздней версии. Самый простой способ получить эти инструменты — это установка Microsoft Visual C++ Build Tools 2019 , которая предоставляет только инструменты сборки Visual C++. В качестве альтернативы этому способу, вы можете установить Visual Studio 2019, Visual Studio 2017, Visual Studio 2015 или Visual Studio 2013 и в процессе установки выбрать «C++ tools».
Для получения дополнительной информации о настройке Rust в Windows, смотрите Windows-специфичную документацию rustup .
Управление инструментами с rustup
Rust устанавливается и управляется при помощи rustup . Rust имеет 6-недельный процесс выпуска и поддерживает большое количество платформ, так что большое количество сборок Rust доступно в любое время. rustup согласованно управляет этими сборками на каждой платформе, поддерживаемой Rust, включая установку Rust из beta и nightly каналов выпусков, а также поддерживает дополнительные цели для кросс-компиляции.
Если вы ранее устанавливали rustup , то вы можете обновить инструменты разработчика запустив rustup update .
Для дополнительной информации смотрите документацию по rustup .
Настройка переменной окружения PATH
В среде разработки Rust, все инструменты устанавливаются в директорию
/.cargo/bin %USERPROFILE%\.cargo\bin , где вы можете найти набор инструментов Rust, включая rustc , cargo и rustup .
Соответственно, разработчики на Rust обычно включают её в переменную окружения PATH . В процессе установки rustup пытается сконфигурировать PATH . Из-за разницы между платформами, командными оболочками и багами в rustup , изменение PATH может не принести результата до тех пор, пока консоль не будет перезапущена или пользователь не перезайдёт в систему, а может и не удастся вообще.
Если после установки запуск команды rustc —version в консоли терпит неудачу, это может быть наиболее вероятной причиной.
Удалить Rust
Если вы по какой-то причине хотите удалить Rust, вы можете запустить rustup self uninstall . Нам будет тебя не хватать!
Другие методы установки
Для большинства разработчиков, процесс установки, при помощи rustup , описанный выше, является предпочтительным способом установки Rust. Однако, Rust также может быть установлен при помощи других методов.
Источник