Download Latest Version rds-1.15.00-linux-x64.zip (4.9 MB)
Email in envelope

Get an email when there's a new version of RustDevelopmentStudio

Home / version 1.14.04
Name Modified Size InfoDownloads / Week
Parent folder
rds-1.14.04-X86-Win.zip 2025-05-26 9.6 MB
README.md 2025-05-23 9.9 kB
rds-1.14.04-M-macos.zip 2025-05-23 4.9 MB
Totals: 3 Items   14.5 MB 0

Rust Development Studio - CGI

Purpose

Web interfaced IDE for app development in different tech stacks, but primary Rust targeted. The IDE can run locally or some cloud machine. It can be accessed from any device having a HTML5 capable browser. It's perfect for tablets as Amazon fire.

Architecture

The client part is quite obvious and utilizes HTML 5, CSS and JavaScript. But the server part resurrects the forgotten CGI technology which is perfectly suitable for using Rust. The terminal functionality is implemented using the websocket. So the RDS has written in Rust, HTML, CSS, and JavaScript.

Implementation

It's a really compact with footprint below 10 MB. All web requests are handled by one Rust CGI executable. The terminal is a websocket endpoint represented by the WS-CGI technology and implemented as a Rust application too. Java based websocketendpoint is deprecated.

Config

Java or Rust can be used for running a web server and addressing endpoints for websocket driven fuctionality.

Java

All below steps consider that TJWS is used as a web server and CGI provider. Any other server can be used with some modifications of the steps. You need to add to TJWS aliases.properties file lines reflecting the location of the CGI script like below:

from=/rustcgi;dir=~/projects/rust_util/src/rust/rustcgi
from=/cgires/resource;=~/projects/rust_util/src/rust/rustcgi/resource

Note that the resource directory has to be a sub-directory of the CGI script directory.

Specify aliases.properties in the TJWS starting command as:

-a aliases.properties

The /rustcgi mapping has to be a CGI aware when start TJWS using the command line argument below:

-c /rustcgi

Make sure that a directory, where rustcgi accessed from, contains the file .home with one line containing the user HOME directory or other directory where rustcgi will look for settings in the sub directory .rustcgi. For example:

/home/john

Another property has to be added to the starting starting TJWS command is:

-Dtjws.websocket.container=true

to assure that the websocket support will be enabled required for a terminal.

An acceptor with a channel for a non blocking IO is requiring for a correct websocket functionality. For example:

-acceptorImpl Acme.Serve.SelectorAcceptor

Currently the websocket uses the same host and port as the CGI server. If you plan to run a websocket on different port or/and server, you need to specify its settings at line 384 in main.js as bellow:

 const port = 8443//location.port // 8443 for a brutal use different server

and uncomment the following line at 393

       'ws'+sec+'://'+location.hostname+portExt+

Note that a server where websocket endpoint resides will be the server for all underline terminal commands. If websocket machine is different that CGI script machine, the HOME directory should be some network place accessible from both machines.

If you plan to use HOME directory different than provided by OS, you need to specify it in a TJWS starting command as property HOME:

-DHOME=/media/exhdd/RDS

Note: the home directory has to be in sync with in the .home file specified.

rds.sh script with underline bee.7b is a good example of the mentioned command options.

Rust

Rust server is the SimHTTP.

The following configuration snippet has to be added in env.conf,

"mapping" : [
 {"path":"/cgires/resource",
       "CGI": false,
       "translated": ".\\..\\rusthub\\src\\rust\\rustcgi\\resource"},
      {"path":"/rustcgi",
       "CGI": true,
       "translated": ".\\..\\rusthub\\src\\rust\\rustcgi"},
      {"path":"/terminal",
       "WS-CGI": true,
       "translated": ".\\..\\rusthub\\src\\rust\\rustcgi\\terminal"}],

Make sure that translated paths are valid in the underline OS. Only file .home is required since everything is Rust based. The terminal endpoint has to be built. bee-term.7b script is provided for that. You will need to build simweb crate first.

The rest components and their locations are matching Java deployment.

You are free to use any other web server capable to run CGI scripts. The same or other server implementing JSR 356 is required for a terminal support. Rust terminal can be used only with SimHTTP, because only this server provides the WS CGI support.

Ace Cloud editor

Rust Development Studio is loosely coupled with Ace (Ajax.org Cloud9) Editor.

RDS is coming bundled with some version of the Ace editor. You can always bundle it with any other version of the editor. Go to Ace and download a desired version and then copy it over the directory resource/ace.

What is the project?

RDS is a single user web application. However a user may want to handle several RDS projects in the scope of a single browser. The parameter project helps to separate projects and the corresponding settings data.

Packaging

Although you can configure the development studio yourself accordingly to a web server and other components. Three underline OS executables' are written in Rust are:

rb
rustcgi
terminal

If TJWS is used as a web server then the following jars are required:

class-scanner.jar
javax.servlet-api-4.0.1.jar
javax.websocket-api-1.1.jar
rds.jar
webserver.jar
wskt.jar

Any JVM from 8 to 24 can be used. HTTPS is supported and preferred.

If the SimHTTP is used as a web server, then one more Rust executable is required,

simhttp

The standard packaging includes all required RDS components. Just launch ./rds.sh or .\rds.bat and you can start using the RDS. The access URL stored in rds.url.

Building rustcgi components

You need the rustc and javac (optional) for building RDS components. I use the RustBee scripting tool to simplify the build procedure. However, you can use any other building tool (including Cargo) and TOML scripts. If you decide to use the RustBee, you may need to build it first, but only once. For example, I wanted to build the RDS on Raspberry Pi. First, I installed rustc (you need the version 1.80 or better, visit the site for the info how to install). Next, I downloaded bee.jar from sourceforge for a bootstrapping. I downloaded the simple zip crate from github, the simple time crate, and finally I checked out https://gitlab.com/tools6772135/rusthub/-/tree/master. I switched to scr/rust/rustbee and edited bee-rust.xml to specify the simple zip and the simple time repositories location. I executed java -jar \<dir where\>/bee.jar to build rb. You can install it after the building by executing sudo ./rb install, or simply add the current directory to the PATH env. Check out common building scripts. You do not need to build them, but they used for building all required components. You can build one more dependency SimRan now using the just built rb. Check out the project and run rb in their directory.You may edit bee.7b to make sure that crate_dir is consistent between different projects. You need also to clone Simple Thread Pool and then build it using rb.

You are ready to build rustcgi now. Switch to scr/rust/rustcgi and execute rb. Use rb -Dopt=release, for building a release version. Run rb -f bee-term to build the terminal piece.

You can also build Jave terminal support, but it is out of support now. Switch to directory src/java/rustcgi to build rds.jar. Execute rb. Copy src/java/lib/rds.jar to the web server Java lib directory after. You can edit APP DEPLOY DROP in src/java/rustcgi/bee.7b to specify the target directory and avoiding a manual copying. Restart the web server to get a new websocket end point deployed.

The similar steps have to be performed on other platforms as MacOS(an installer for it is available now) , or Free BSD where no an installer provided yet.

Working tips

You will see an empty page when first time pointed a browser to RDS URL. Select menu Settings or File/Project/New.... Navigate to a project directory and then save the settings. Reload the RDS web page. You can start now navigate over the project tree, open and edit files, build its components and so on.

If you do not have the project checked out yet, then you can check it out first, and then to set the project root in the settings. You can execute underline OS commands as mkdir, git clone, and others in the terminal window.

When you use Cargo to build a Rust project, make sure to set CARGO_TERM_COLOR env variable to always. It is controlled also by term.color of Cargo settings. For example:

[term]
color=always

Browser compatibly

RDS uses HTML 5 features and compatible with browsers supporting them. Compatibility was tested using the latest Firefox, Edge, Safari, and Amazon Silk browsers. More likely, other browsers will work too. If you encounter problems with any browser, then please report them to the author.

Known problems

  1. datalist seems isn't supported by the Silk browser, so an auto suggest won't work on Fire tablets

Reading about

  1. Some light on using technologies.
Source: README.md, updated 2025-05-23