RDF Twig is implemented as a set of (Java) XSLT extension functions and elements.
The current implementation is built on top of the Jena RDF toolkit.