Open Source C/C++ Truffle languages available?

Gerard Krol gerard at gerardkrol.nl
Sun Jul 24 14:53:22 UTC 2016


Hello Chris,

Thanks for your quick response. I'm interested in building a C++ like
language using Truffle, that would support a "sensible" subset of C++. It
would use garbage collection and provide memory safety though, as well as
other things that in my opinion are missing from C++. The language is
called "Cover" (for now).

I'm basing Cover on SimpleLanguage, and am currently using the Eclipse CDT
C++ parser. Currently it is in the "hello world + loops" phase. If you want
to follow along take a look at https://github.com/gerard-/cover .

Regards,

Gerard


On Sun, Jul 24, 2016 at 3:19 PM, Chris Seaton <chris.seaton at oracle.com>
wrote:

> Hello Gerard,
>
> The old C implementation was called TruffleC. It interpreted the C
> language AST. Sulong interprets the LLVM IR instead. That’s not really a
> huge difference in practice. LLVM IR is a bit like a linearised version of
> the AST and doesn’t include much lowering or optimisation. TruffleC uses
> the same clever hacks as Sulong.
>
> JRuby's C extensions (which are still at an early stage) used to use
> TruffleC, but they now use Sulong.
>
> TruffleC isn’t open source, and there aren’t any plans that I’m aware of
> to open source it. Sulong is open source already. If you were happy with
> the TruffleC approach there’s not any reason that I know of that would mean
> Sulong wouldn’t also be appropriate, so I see TruffleC as deprecated by
> Sulong which is why there isn’t a great demand to open source it.
>
> Chris
>
> > On 24 Jul 2016, at 09:12, Gerard Krol <gerard at gerardkrol.nl> wrote:
> >
> > Hi,
> >
> > I've recently learned about Tuffle/Graal. It seems great technology.
> >
> > I'm interested in running C++ code on the JVM, without resorting to the
> > (admittedly clever) Sulong hack. I've seen some presentations and read
> some
> > papers about a C implementation, but that one doesn't seem to be open
> > source. The same goes for the C extensions for JRuby. Is that correct?
> >
> > If so, what are the reasons for not open sourcing it? Any plans to do so
> in
> > the future?
> >
> > Regards,
> >
> > Gerard
>
>


More information about the graal-dev mailing list