I originally wanted my compiler base to be in Node.js, because it compiles anywhere (for example, using Termux from Google Play Store you can compile and install NPM packages environmentally), however Node.js/V8 performance has been terribly bad.
Today I've my last compiler base in Adobe AIR, however it can only be easily compiled from Windows, which is not satisfying. It's a bit possible to use Adobe AIR SDK from Android through the app UserLAnd, but it's very indirectly usable.
So, I'm wanting to re-implement my compiler base in Rust, however I'm afraid of Semantic Data Model. Sometime I was trying to do the Semantic Data Model in Rust, but the popular gc crate doesn't let you do Gc<dyn Symbol>, what leads me to be limited with Rc<dyn Symbol> and Weak<dyn Symbol>.
For example, I've this ActionScript on my Semantic Data Model:
package dsc.semantics.values {
import dsc.semantics.*;
import dsc.semantics.constants.*;
public class ObjectValue extends Constant {
private const _names:Names = new Names;
private var _definedIn:Symbol;
}
}
Where Constant extends Symbol and where Names leads to further Constants.
If Names contained a collection of Rc<dyn Symbol> pairs, where any element may refer to the parent Rc<dyn Symbol>, a circular reference would arise. Is there any way to use the gc crate with traits using dyn? A collection of Weak<dyn Symbol> is not viable.
This was fixed in this pr 2 months ago, but I guess the crate on crates.io hasn't been updated since then. You can either ask for it to be updated and wait or swap the dependency registry to github.