Ever wondered how .NET actually works? What goes on behind the scenes with the CLR and JIT compilation. Now Microsoft gives you a chance to actually view all that by release SSCLI – Shared Source Common Language Interface or popularly called Rotor. This is the open source implementation of the CLI which runs .NET.
For Microsoft, which usually is the scourge of open source crowd and doesn’t believing in giving code away, Rotor is a huge step forward. For one, It shows its sincerity in getting more and more developers to code and extend its products. After all, with its huge financial muscle, MSFT has got the best developer talent to develop the framework and the IDE, but making it open source goes one step forward, revealing the internal workings encourages developers to improve the core product rather than just remain end users.
Setting up Rotor is fairly simple. Here are the steps:-
- Download Rotor Here. It is a 21.6 MB and the tar.gz file will get downloaded.
- Decompress the tar.gz file to a local disk.
- Now Rotor requires Perl to be installed as well. So download ActivePerl from here.
- The Perl environment variables need to be set. In Vista, this required a reboot
- In the directory where Rotor was extracted, run env.bat. This batch file will set the various environment variables.
- Once done, run buildall.cmd from the same location. It takes forever to complete and when its done, you end up with 1.2 GB of code you can go through.
After it completes, go the Samples\Hello directory and execute csc Hello.cs from the command prompt. The file should compile.Â After this do clix Hello.exe. If your program says “Hello World”, you are all set!!
Once done, this is a good time to start looking at the source code. A good place would be sscli20\clr\src\bcl to get the source code for the BCL without Reflector. More on Rotor later.