Skip to content

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

Notifications You must be signed in to change notification settings

jimurrito/WorkSpace4Rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages