codespaces-examples / Rust

Licence: mit

Programming Languages

shell
77523 projects
rust
11053 projects

Projects that are alternatives of or similar to Rust

Vscode Simple Vim
Vim extension for VSCode
Stars: ✭ 38 (-17.39%)
Mutual labels:  vscode, visual-studio-code
Vscode Project Manager
Project Manager Extension for Visual Studio Code
Stars: ✭ 1,022 (+2121.74%)
Mutual labels:  vscode, visual-studio-code
Nord Visual Studio Code
An arctic, north-bluish clean and elegant Visual Studio Code theme.
Stars: ✭ 749 (+1528.26%)
Mutual labels:  vscode, visual-studio-code
Vscodenotebook
📝 Use VS Code as a reliable note-taking/journal application
Stars: ✭ 584 (+1169.57%)
Mutual labels:  vscode, visual-studio-code
Vscode Stylefmt
🔌 VS Code plugin for stylefmt— Format your CSS using stylefmt.
Stars: ✭ 42 (-8.7%)
Mutual labels:  vscode, visual-studio-code
Vscode Peacock
Subtly change the color of your Visual Studio Code workspace. Ideal when you have multiple VS Code instances, use VS Live Share, or use VS Code's Remote features, and you want to quickly identify your editor.
Stars: ✭ 690 (+1400%)
Mutual labels:  vscode, visual-studio-code
Polacode
📸 Polaroid for your code
Stars: ✭ 6,511 (+14054.35%)
Mutual labels:  vscode, visual-studio-code
Vscode Portable
Portable version of the Visual Studio Code editor
Stars: ✭ 448 (+873.91%)
Mutual labels:  vscode, visual-studio-code
Vscode Intelephense
PHP intellisense for Visual Studio Code
Stars: ✭ 872 (+1795.65%)
Mutual labels:  vscode, visual-studio-code
Wslgit
Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)
Stars: ✭ 903 (+1863.04%)
Mutual labels:  vscode, visual-studio-code
Vscode Markdown Pdf
Markdown converter for Visual Studio Code
Stars: ✭ 571 (+1141.3%)
Mutual labels:  vscode, visual-studio-code
Theme Bear
🐻 A VSCode dark theme 🐻
Stars: ✭ 27 (-41.3%)
Mutual labels:  vscode, visual-studio-code
Vetur
Vue tooling for VS Code.
Stars: ✭ 5,421 (+11684.78%)
Mutual labels:  vscode, visual-studio-code
Openincode
📂 macOS Finder toolbar app to open current folder in Visual Studio Code
Stars: ✭ 734 (+1495.65%)
Mutual labels:  vscode, visual-studio-code
Dotfiles
💾 Ian's dotfiles, utils, and Zsh/Vim/tmux configs
Stars: ✭ 554 (+1104.35%)
Mutual labels:  vscode, visual-studio-code
Vscode Git Graph
View a Git Graph of your repository in Visual Studio Code, and easily perform Git actions from the graph.
Stars: ✭ 767 (+1567.39%)
Mutual labels:  vscode, visual-studio-code
Awesome Vscode
🎨 A curated list of delightful VS Code packages and resources.
Stars: ✭ 19,659 (+42636.96%)
Mutual labels:  vscode, visual-studio-code
Marp Vscode
Marp for VS Code: Create slide deck written in Marp Markdown on VS Code
Stars: ✭ 442 (+860.87%)
Mutual labels:  vscode, visual-studio-code
Vscode Bookmarks
Bookmarks Extension for Visual Studio Code
Stars: ✭ 804 (+1647.83%)
Mutual labels:  vscode, visual-studio-code
Without Guns For Vs Code
Visual Studio Code extension that teaches you mindful programming
Stars: ✭ 14 (-69.57%)
Mutual labels:  vscode, visual-studio-code

Codespaces Rust Starter

This project is a generic starter for developers to use in Codespaces that includes basic system tools and extensions.

What's Included

This is a basic environment that should be ready to expand upon to build a day-to-day development envrionment for Rust. It comes with the following software choices:

System Tools

  • curl/curl: the command line tool for transferring data over a metric boatload of protocols.
  • git: the Git SCM tool.
  • gnupg2: a complete and free implementatiuon of the OpenPGP standard.
  • stedolan/jq - a command line JSON parser.
  • sudo - the superuser authority delegation tool.
  • zsh - interactive terminal (alternative to bash).
  • ohmyzsh/ohmyzsh - a delightful community driven framework for managing zsh config.
  • vim - a text editor
  • build essentials - tools for compiling and linking code
  • openssl - tls and ssl toolkit

Rust Tools

Besides Rust and Cargo, the image comes with the following Rust related tooling:

  • rustup: installer and toolchain manager
  • rustfmt: a tool for formatting Rust code according to style guidelines
  • clippy: lints to catch common mistakes and improve your Rust code

VS Code Extensions

  • Rust Analyzer: an alternative rust language server to the RLS.
  • CodeLLDB: native debugger based on LLDB.
  • Crates: helps Rust developers managing dependencies with Cargo.toml.
  • Live Share: collaborative, multi-user remote editing from directly within the editor.

Operating System

Usage

Visual Studio Codespaces

Inital Creation

For usage in VS Codespaces, you're going to want to head over to online.visualstudio.com and sign up for VS Codespaces (that process is outside the scope of these instructions). Once you've got an account and are signed in to online.visualstudio.com, you're going to take the following steps:

  • Ensure you're on the /environments page at online.visualstudio.com/environments
  • In the top right corner, there'll be a "Create environment" button. Click this button, which will open up a panel from the right side of the screen. Fill in the details of this panel:
    • Codespace Name: This will be the visible name of your environment within Codespaces. The value here doesn't particularly matter.
    • Git Repository: This is going to be either the URL you'd git clone the repo from or the GitHub <org OR user>/<repo> shorthand. For this repo, the easier value would be codespaces-examples/rust.
    • Instance Type: For this, you're going to choose your plan - in my case, I'm just going to go with the Standard (Linux) plan. For most use cases of this starter, Basic (Linux) should suffice. You can also change your plan at any time, as your workload demands.
    • Suspend idle environment after: This is the period of time you want your environment to automatically suspend after you've stopped actively using it. I generally chose 5 minutes and have not had any problems to date.
    • Dotfiles (optional): These are entirely optional, and are available for advanced users.
      • Dotfiles Repository: Using the git clone URL or the GitHub <org OR user>/<repo> syntax, you can define the repo to pull your dotfiles from. For examples, see jessfraz/dotfiles or fnichol/dotfiles.
      • Dotfiles Install Command: The name of the file or the command to run to install your dotfiles.
      • Dotfiles Target Path: The path where your dotfiles should be installed.
    • Once you've filled out all of those (and resolved any errors in the form validation, if any occurred), you'll be able to click "Create" at the bottom of the panel and your environment will start creating.

Connecting to your Environment

Once you've completed the Creation steps, your environment will be usable from Codespaces until you delete it. You can access it by going to online.visualstudio.com and selecting the vertical elipsis menu to connect to it from the browser or launch it in VS Code / VS Code Insiders.

When inside of the environment you can change envrionments themselves from the command pallete with the Codespaces: Connect.

Note: See the VS Online in the Browser quickstart for more information.

Additionally, if you've installedthe Visual Studio Codespaces extension in VS Code locally, you'll be able to directly connect from VS Code itself.

Note: See the VS Online in VS Code quickstart for more information.

Working

Now that you're set up and connected, you should be able to work within your Codespaces environment.

Developing inside a Container

Using Visual Studio Code and a specific extension, we can load this setup in a brand new local Docker container and use it as a full-featured development environment. Note that this approach requires a few more steps than using the online setup mentioned above. The advantages being that this works offline and there are no costs associated with this approach. It is a great way to play with a setup without having to install everything globally on one's machine!

Requirements

There are 3 main requirements: VSCode, the Remote - Containers VSCode extension and Docker.

Follow the instruction guide here and come back here once those 3 components are installed locally.

Setup

To load this setup in a container, we need to point to it. We have many options here, the main ones being to connect to a repository and the other one to open a local folder with the codespace repo checked out. We are going to take the easiest approach and setup the code space directly from this repository.

  1. In VSCode, click on the green icon in the lower left corner.

  1. Choose Remote-Containers: Open Repository in container
  2. Type codespaces-examples/rust in the prompt.
  3. Chose to create a unique volume.
  4. Wait until the container is setup and you are connected to it, at this point, it should ask you to install the Language server for the rust-analyzer, go ahead and click "Download now".

That's it, you are all setup, you can modify and run the code in your local VSCode instance but the code and extensions will run in your container.

Contributing

Contributions are welcome. Please refrain from opinionated additions like linters. However, adding package managers and other DX improvements that are additive like yarn are welcome. Contributors must follow the Code of Conduct.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].