dyon icon indicating copy to clipboard operation
dyon copied to clipboard

Seamless translation from Dyon to Rust

Open bvssvni opened this issue 8 years ago • 0 comments

When working on https://github.com/PistonDevelopers/dyon/pull/432, I realized that since you can generate the meta data in Rust and create a module, you can also replace some of the meta data with generated external functions. This might allow a seamless translation from Dyon to Rust, where the code generator translates what it can and leaves the rest as Dyon code. Over time, as the code generator gets better and better, it can translate more of the harder stuff and make it run significantly faster, without changing the way the program works. When there are problems, two versions of the same function can be used, depending on whether it gets called from Dyon or Rust.

It is hard to do good translation without some integration with other tools. However, since you might want to use code generation for improving startup times, then using the same tool to do seamless translation will make it easier to test new techniques.

Also, as the code generator will be able to generate Rust code of itself, it will benefit from some of the same improvements that it brings to other programs.

The requirement of seamless translation might involve some changes to the external function signature.

bvssvni avatar Jan 15 '17 18:01 bvssvni