Reidar Sollid's Blog

Just another WordPress.com site

Archive for March 2012

RustyCage a Rust-lang IDE plugin for Eclipse

with 21 comments

I have created a Rust plugin for Eclipse, so here is a small intro how to use it.

First you need to chose the Rust perspective.

RustPerspective

If you want code completion from the std libs, you need to download the rust source code and add rust home your rust preferences.

RustHome

Then in the Rust perspective chose New RustProject

RustProject

This opens the rust project wizard.

NewProjectWizard

The default is lib, so if you want a executable you need to check of the lib check box. And fill inn version and author. Here is an example.

NewProjectWizardEx

Press Finnish and your rust project is created. A crate file is created for your project.

CrateCreated

No you probably want a rust file, chose new rust file.

NewFIle

This will open the new rust file wizard. Give the file a name. The must be a .rs or .rc file.

NewFileWizardEx

Then your crate file has been updated with your new rust file.

UpdatedCrate

Now enter your code in the rust file. And you have the compile and the run buttons in your task bar. Compile and run uses the context of the file you are in, so you can either compile the crate or just one file.

HelloWorld

Compile output in the console window.

CompileConsole

And finally press the run button and you get the result in the console window.

RunConsole

You can fetch the plugin via github from
https://github.com/reidarsollid/RustyCage

Or get it from update site
https://sourceforge.net/projects/rustycage/files/updatesite/

RustyCage is writen in Scala so you need the Scala compiler to install it.

http://download.scala-ide.org/sdk/e38/scala210/stable/site

Build your own update site with maven and tycho
https://bitbucket.org/rsollid/tycho-rustycage

Written by reidarsollid

March 27, 2012 at 5:17 pm

Posted in Rust, software