I started working on Mono.Cecil during the fall of 2004. In its current incarnation, it served me and a lot of people very well. But looking at it now, it aged quite a bit. The code still compiles on .net 1.1, is using old conventions, doesn’t have a real test suite, is quite memory hungry, and is not that optimized. Which doesn’t prevent it to be a useful and wide used library, but looking back; I could have done a lot of things differently. And doing things differently is basically what I’ve been doing for the past two years in my free time. What originally started as a refactoring of Mono.Cecil for the decompiler, ended up as a rewrite from the ground up. And today I’m excited to make public what is the next version of Cecil, which I’ve been fondly calling “cecil/light”. Let’s start with a warning; this version contains breaking changes with the previous API. I didn’t promise API stability for the previous code, but this iteration of Mono.Cecil, tagged 0.9, is a huge step towards 1.0 and API stability. But let’s focus for a while on the bright and new side. Mono.Cecil 0.9 comes with: * A cleaned and genericized API, I took this opportunity to clean some parts I hated in the old API.
* A smaller and easier to maintain C#3 code base (Mono.Cecil 0.9 compiled with optimizations by csc is about 250k against almost 400k for 0.6) which only requires a .net 2.0 compatible runtime.
* A test suite which is very easy to augment.
* Better support for pdb and mdb files and strong name assemblies.
* Complete support for PE32+ assemblies.
* Bug fixes that weren’t possible without large changes in the old code.
* Less memory consumption.
* Lazy loading of every metadata element.
* Speed and optimizations.
* Complete Silverlight support.
* A beginning of documentation on a wiki.
* A collection of extension methods to add features to Cecil when they’re not necessary to the core assembly. I ported a few of my projects to this version of Cecil already, and it shows great results. I didn’t spend more than four hours per project to adjust the code in a branch. There’s a migration page on the wiki to help you. If it doesn’t answer your question, reach us on the mono-cecil group. Read more: Jb in nutshell, Mono.Cecil
* A smaller and easier to maintain C#3 code base (Mono.Cecil 0.9 compiled with optimizations by csc is about 250k against almost 400k for 0.6) which only requires a .net 2.0 compatible runtime.
* A test suite which is very easy to augment.
* Better support for pdb and mdb files and strong name assemblies.
* Complete support for PE32+ assemblies.
* Bug fixes that weren’t possible without large changes in the old code.
* Less memory consumption.
* Lazy loading of every metadata element.
* Speed and optimizations.
* Complete Silverlight support.
* A beginning of documentation on a wiki.
* A collection of extension methods to add features to Cecil when they’re not necessary to the core assembly. I ported a few of my projects to this version of Cecil already, and it shows great results. I didn’t spend more than four hours per project to adjust the code in a branch. There’s a migration page on the wiki to help you. If it doesn’t answer your question, reach us on the mono-cecil group. Read more: Jb in nutshell, Mono.Cecil
0 comments:
Post a Comment