Open drom opened 4 years ago
I started this some time ago (see this branch). I think the main work to be done is to build shims from java standard library to whatever backend you use. If targeting browser, you need to decide how you're dealing with files and other things. If targeting node, I think your choices are more straightforward, but it is still a considerable amount of work.
I think the JSON/YAML serialization stuff uses reflection extensively and is also therefore not a great candidate for ScalaJS. This mostly impacts how you'll deal with annotations. I think protobufs can be used with scalajs fairly easily, so this is probably the way to go.
Thank you @grebe for the update. Great to see work in progress, list of potential issues and idea about solutions. Do I understand that the major effort would be in:
Any other issues on the horizon?
@jackkoenig, @azidar do you see other potential pain points? https://twitter.com/wavedrom/status/1225197219713703936
JSON/YAML serialization without refection
How does one [de]serialize user-defined datatypes in an extensible way without reflection?
In any case, I think it's a moot point because I think ScalaJS supports our needs for reflection via a macro annotation: https://www.scala-js.org/api/scalajs-library/latest/#scala.scalajs.reflect.annotation.EnableReflectiveInstantiation
I think we should better use c ++ to re-implement the firrtl tool, it can use the antlr4 Grammar directly. so the firrtl tool no longer need a lot of dependencies(Scala,JVM ..), and it can be bound to whatever language.
I think we should better use c ++ to re-implement the firrtl tool, it can use the antlr4 Grammar directly.
Maybe porting to Scala Native is more reasonable.
Checklist
Feature Description
Porting FIRRTL to Scala.js would enable a few new use cases:
Type of Feature
Related Features
not found
External Information
https://twitter.com/wavedrom/status/1225197219713703936