Coder Social home page Coder Social logo

workspace4rust's Introduction

Workspace 4 Rust Development

VS Code-Server pre-configured for Rust development

This is a remote VS Code server, that has tools pre-installed, that can assist in the development of Rust and Non-Rust applications. ๐Ÿฆ€


Table of Contents

Components

  • Rust (cargo, rustup, etc)
  • Python3 & Pip
  • Docker
  • Custom shortcuts *
  • Optional set of default VS Code extensions *

* WorkSpace Shortcuts (wksp)

Custom shortcuts for a combination of common tasks to help the lifecyle of app developement. A primary case being: wksp -C; When used, it removes all containers, and images from docker. Helping clear up a workspace mid-project. The default set of extensions can be installed with: wksp -I.

Deprecated SSH-Key dump

By default, the container will generate an SSH key pair. When the user session starts, i.e the user signs into the server via SSH or VS Code, the server will copy the private key, into the /keys directory. If /keys is bound to the host via -v. This key can be added to your desktop to allow for seamless signon into the workspace. As of now, the password of the SSH key, is the same one set for the user.

Change to SSH behavior v1.12.6 => v1.12.7

In v1.12.7, an SSH private key is no longer generated and provided by the service. A public key is now provided to the workspace instead.


docker run -itd \
    # *Required*
    # Port for SSH
    -p <hostport>:22 \
    # *OPTIONAL*
    # SSH Public-key dump location (Recommended)
    -v <dir-2-keys>:/keys \
    # Workspaces location
    -v <dir-2-wksp>:/workspaces \
    # Password for remote connection and root user
    -e PSWD="<password>" \
    # Git config for workspace
    # user.name
    -e "GIT_USER_NAME"="ferris" \
    # user.email
    -e "GIT_USER_EMAIL"="[email protected]" \
    #
    jimurrito/ionupdate_rs:latest


How to connect

  1. Install the [Remote Explorer Extension](https://marketplace.visualstudio.com/items?itemName=ms-VS Code-remote.remote-ssh) in VS Code
  2. Select the Remote Explorer tab on the left-side bar
  3. Create a new host, using the IP and Port combination chosen for the conatiner
  4. Connect to the container and enter the password chosen in the docker run command issues. Default: ferris

SSH (Optional)

Attach a local filesystem to the /keys volume, to get access to the ~/.ssh directory for your workspace user. Dropping a public SSH key into this directory will allow you to seamlessly signon with the private key from the pair.

Note:
If there us no pre-existing authorized_hosts file within the /keys or ~/.ssh directory. Run copy-ssh-id, with the proper login and path information.This not only copies the SSH private key specified as an argument, but generates the authorized_hosts file for you.


Default Extensions [ wkps -I ]


Creating custom wksp commands

Open the /wksp/root.sh file via your chosen IDE

nano /wksp/root.sh

or

By using this command built into wksp

wksp -N "<(Opt)IDE>" # Default IDE is nano

Then navigate down to line '45', and create your new commands.

 (39) ......
 (40) #
 (41) # ---------------------------------
 (42) # [[[ CUSTOM COMMANDS ]]]
 (43) #
 (44) # <Command description>
 (45) elif [ "$1" = "--<long-arg>" ] || [ "$1" = "-<short-arg>" ]; then
 (46)     <COMMAND>
 (47) #
 (48) # ---------------------------------
 (50) #
 (51) ......
elif [ "$1" = "--<long-arg>" ] || [ "$1" = "-<short-arg>" ]; then
    <COMMAND>
  • It's recommended to save the Command script to the /wksp directory.
  • Try and follow the cmd template above.
  • Recommend to add your new cmd to /wksp/help.info
  • If you create anything cool, please create a pull request. Always looking for more ways to improve the development of most applications. โค๏ธ

Links

If you run into any problems, or just have a question. Please submit an issue @ https://github.com/jimurrito/workspace4rs/issues

workspace4rust's People

Contributors

jimurrito avatar

Watchers

 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.