Binding to the PCSC standard

My name is Manuel Fernando V. Preliteiro, I'm a Computer Science student at Universidade da Beira Interior (UBI) in Covilhã in Portugal .
I recently developed an OCaml binding that allows the manipulation of Smartcards in OCaml, both in Linux, through the C library PCSC-Lite provided by M.U.S.C.L.E. and in Windows through Winscard.dll.
This means you can develop Smartcards applications using OCaml. The advantages should be evident, it is the best of 2 worlds, Smartcards flexibility and security and OCaml reliability .


Ocamlpcsc is freely available, under the terms of the GNU Lesser General Public License. There are differences between Windows and Linux, because PCSC-Lite only implements the functional part of the standard and Windows implements everything (Card database functions, etc...) and even some non standard functions, all the details are in the documentation.

  • Windows - Winscard.dll should already be in your system under c:\windows\system32.
    • ocamlpcsc-0.6.zip
    • Online documentation
    • Under windows XP you will probably need to activate the PC/SC service. Do it in "Administrative Tools/services" and activate "Smart Card".
    • You will also need "MinGW" software so you can run "gcc".

You can contact me for Bug reports, suggestions or new jokes by my email: a14173@ubi.pt

The actual version of ocamlpcsc, version 0.6, is still a Beta version. For testing purpose and as a proof of concept, I implemented a case study (a simple voting system in OCaml using smart cards) and all went well, but as you can guess I cannot garantee it's bug free. If you want to make it better fell free to send me your feedback :)