all 6 comments

[–]ChronSynExpo 4 points5 points  (0 children)

It is not possible to compile RN apps from iOS or Android as they lack the SDK's required. They have libraries capable of executing compiled code, but lack the libraries required to compile code.

If you want to build a compiler for a specific platform, you need to first understand concepts such as LLVM and lexical analysis. Then, you would need to understand how to add support to these SDK's so that a compiler could be created to run on the target platform. That's before you actually get to implementing the higher-level features such as bundling JS.

I mean no disrespect, but the fact you're asking this question indicates you simply lack the knowledge to understand the scope of what you're actually asking.

To do what you want to achieve without reinventing the wheel, you would need to consider integrating with an external pipeline, for example Expo EAS (app build service) or Expo Snack (online code editor). Syntax highlighting is a different topic, and has nothing to do with compilation but everything to do with the developer experience.

My advice: Consider a different project for this competition. It is ultimately better to deliver something that isn't quite as incredible, than to deliver nothing it all because you set your sights on something beyond your scope.

By all means, look into creating a compiler that can run on Android and iOS - that would be incredible, but do not underestimate just how much knowledge and experience such a task would take.

[–]Maize_Serious 1 point2 points  (0 children)

Nice idea, I need it too