GithubHelp home page GithubHelp logo

neonwatty / vsc_rust_docker Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.94 MB

A simple way to get started with rust with vsc and docker

Dockerfile 0.09% Rust 0.04% CSS 0.90% HTML 0.23% JavaScript 77.61% TypeScript 21.14%
docker docker-compose docker-in-docker rust vscode zsh

vsc_rust_docker's Introduction

vsc_rust_docker

Fast and portable way to get started with rust using Visual Studio Code IDE in the browser via a simple docker pattern. No assembly required - the only dependencies are a browser of your choice and having docker and docker-compose installed on your local machine.

A similar but different pattern that keeps rust in a separate container using a docker-in-docker pattern can be found in this branch.

Alternatively, if you a simple but powerful vim setup can be found in this branch.

Getting started with VSC in browser

After pulling the repository, cd into and spinup the compose file by typing

docker-compose up -d

Running this the first time will pull the associated docker image.

Once the compose spinup process is complete, open your browser of choice and type the following into the address bar

http://localhost:8080

This will open up password prompt to enter your VSC container in the browser. The starting password is

temp_pass

You should adjust this password in

/vsc_rust_docker/vsc_ide/configs/code-server/config.yaml

Any installed VSC extensions you install can be found locally on your machine at

/vsc_rust_docker/vsc_ide/extensions

Any Rust projects you create in VSC will also be stored locally at

/vsc_rust_docker/vsc_ide/app/rust_projects

Getting started with Rust

Open a terminal in VSC, and cd to the /projects directory. This directory contains the primary Rust docker-compose file.

To start a new test rust project cd into the /projects and type

cargo new hello_world

After the binary for this test project is completed, cd into the new hello_world directory and type

cargo run

to compile and run the project's binary. You should see successful result

   Compiling hello_world v0.1.0 (/projects/hello_world)
    Finished dev [unoptimized + debuginfo] target(s) in 7.02s
     Running `target/debug/hello_world`

vsc_rust_docker's People

Contributors

neonwatty avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.