We developed a fork of the C backend that generated VHDL, but I can't get into 
the implementation details here.  I think the line between Rust and C is 
two-fold: how many machine architectures Rust has been ported to, and how often 
you need to call C functions from Rust, which means having to use Rust's 
Foreign Function Interface.  Otherwise, Rust is better than C for new code and 
Daffodil should have a Rust backend.

-----Original Message-----
From: Mike Beckerle <mbecke...@apache.org> 
Sent: Friday, January 12, 2024 5:50 AM
To: dev@daffodil.apache.org
Subject: EXT: Re: Rust vs. C backend

what I meant by "What did you mean by the phrase “basis for generating VHDL or 
System Verilog?”

I suppose I was thinking you had a fork of the C backend that created 
Verilog/VHDL, but perhaps the pathway is via the C code output, which is then 
translated into Verilog/VHDL?

In any case we're hearing lots more complaints about performance of Daffodil's 
scala back-end (and missing optimizations in the middle phases).

Generating C code won't work for Cyberian software-based applications as a 
memory-safe language is required in these solutions. I will have to learn more 
about Rust. We need a memory safe language that lets you control the data 
representations far better than Java/Scala and JVM languages. I am curious 
where the line is between Rust and C, i.e., what kinds of things are possible 
in C that aren't possible in Rust.

On Thu, Jan 11, 2024 at 5:01 PM Interrante, John A (GE Aerospace, US) < 
john.interra...@ge.com> wrote:

> Hi Mike,
>
> My view is that when the goal is to generate parsers and unparsers 
> from fixed format binary data DFDL schemas, compile them to native 
> machine code, and execute the machine code on CPUs, Daffodil should 
> generate Rust.  We would have preferred Rust when we started the C 
> code generator work.  Rust is memory safe, type safe, etc. – but it 
> was not available for our phase 1 target CPU.
>
> Creating a Rust backend makes sense, although we don’t think there is 
> a Rust to hardware path – at least none that we are aware of.  What 
> did you mean by the phrase “basis for generating VHDL or System Verilog?”
>
> John
>
> From: Mike Beckerle <mbecke...@apache.org>
> Sent: Thursday, January 11, 2024 5:13 AM
> To: John Interrante <jinterra...@apache.org>
> Cc: dev@daffodil.apache.org
> Subject: EXT: Rust vs. C backend
>
> John,
>
> What's your view of generating Rust vs. Generating C from DFDL?
>
> Those of us working in Cyberia, well, the edict has been issued that 
> only memory-safe languages/runtimes are allowed to reduce risk of 
> cyber-attacks via things like libc flaws.
>
> Seems to me that Rust is the lowest level language that would be 
> acceptable
>
> I believe ultimately, the goal is to generate a useful software 
> implementation that does not compromise on performance, and to be a 
> basis for generating VHDL or System Verilog.
>
> I imagine you've given this some thought you can share.
> Mike Beckerle
> Apache Daffodil PMC | daffodil.apache.org<http://daffodil.apache.org/>
> OGF DFDL Workgroup Co-Chair | 
> www.ogf.org/ogf/doku.php/standards/dfdl/dfdl
> <http://www.ogf.org/ogf/doku.php/standards/dfdl/dfdl>
> Owl Cyber Defense | www.owlcyberdefense.com< 
> http://www.owlcyberdefense.com/>
>

Reply via email to