CSML: high-level bindings between OCaml and C#

CSML is a development tool for the community of OCaml developers under Windows. It lets you write applications that freely mix OCaml and C# code.

CSML has been developed by LexiFi SAS as an internal development tool. LexiFi has decided to distribute it to help people write their Windows applications with OCaml. LexiFi uses CSML for the following scenarios:

Main contact: Alain Frisch.

Screenshots

(Click to enlarge.)

Winforms example (included in the distribution).

With CSML, one can bind existing .Net libraries, like Windows Forms, and use them from OCaml.

The running application.

Mono/Linux version.

Client code.

CSML script.

LexiFi Apropos IDE, a LexiFi product built with CSML.

CSML makes it possible to leverage advanced .Net components (here, a text editor widget) from OCaml.

The running IDE.

Fragments of the CSML script.

Download

Licensing

The CSML compiler is distributed free of charge, but only in binary form. The CSML runtime support is made of C, OCaml and C# units. It is distributed in source form under the terms of an open-source license (LGPL + the typical linking exception for OCaml libraries). Of course, LexiFi claims no right on files produced by the CSML compiler. It it thus entirely possible to use CSML in the context of an open-source project.

The details of the licenses for the CSML compiler and the CSML runtime support are included in the LICENSE file of the distribution.

LexiFi SAS is willing to cooperate with other people interested in improving the CSML system. Feel free to apply for a source distribution of the compiler.

Requirements

CSML is known to work with the two "native" Win32 ports of OCaml (MSVC and MinGW). Its build system requires a Cygwin development environment. It has been tested with the forthcoming OCaml 3.11 (available from INRIA's OCaml CVS) and .Net 2.0.

CSML has also been tested under Linux with the Mono runtime and the Mono C# compiler version 1.2.4.0.

Support

LexiFi does not offer official support for this free version of CSML. However, feel free to contact us if you have questions about CSML. We will not answer basic questions about OCaml or C#.

There is a public mailing list for general discussion about CSML.