PistonDevelopers / PistonDevelopers/dyon

Seamless translation from Dyon to Rust

Open
#433 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion draft
Dominant language
Rust
Stars
1.9k
Forks
56
Avg merge
1m
Merged PRs (30d)
6

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading pull request #432 and the existing code-generation and external-function work it discusses. Define a focused translation path before changing the external function signature. Done would require generated Rust and remaining Dyon code to coexist while preserving program behavior, including calls from both Dyon and Rust.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.