Hello everyone,

I'm interested in adding a D backend to Faust.  I haven't actually used
Faust yet but it looks great.  I'm one of the developers that works on
Dplug and I'm interested in making Faust available for Dplug users.  To be
honest I'm not sure if I have the skillset or time to make this happen, but
I would like to at least try.

Setting up the shell for a new backend has been going well, but I'm having
trouble understanding where "JAVA_BUILD", "RUST_BUILD", "CPP_BUILD", etc
used in global.cpp and libcode.cpp are defined. I've added the following
code to global.cpp

#ifdef DLANG_BUILD
#include "dlang_code_container.hh"
#endif

And in libcode.cpp I've added
#ifdef DLANG_BUILD
// FIR is generated with internal real instead of FAUSTFLOAT (see
InstBuilder::genBasicTyped)
gGlobal->gFAUSTFLOAT2Internal = true;
container = DLangCodeContainer::createContainer(gGlobal->gClassName,
numInputs, numOutputs, dst.get());
#else

I've also added the necessary files.  These are currently just direct
copies of what is in under generator/rust.  Currently I just want to get it
compiling and generating code even if it is technically generating rust.
generator/dlang/dlang_code_container.cpp
generator/dlang/dlang_code_container.hh
generator/dlang/dlang_instructions.hh

In backends/regular.cmake I've added a line
set ( DLANG_BACKEND COMPILER STATIC DYNAMIC CACHE STRING "Include DLANG
backend" FORCE )

Everything compiles and installs correctly, however when I run "faust -lang
dlang fdnRev.dsp -o fdnRev.d", I get the following error:
ERROR : cannot find backend for "dlang"

I'm still trying to familiarize myself with the codebase but I'm really
just having trouble understanding how to get DLANG_BUILD defined and to
have "-lang dlang" as a valid switch.  Any guidance would be greatly
appreciated!

Thanks,
Ethan
_______________________________________________
Faudiostream-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel

Reply via email to