Rust, TypeScript, Swift, and Kotlin codegen and front-end SDK

Context

I have a proposal (see page 28) to build a Swift language SDK for the Apple device platform. Part of the SDK is a runtime metadata Swift codegen tool. I would like to get your (developer) feedback on the codegen tool and my SDK.

In seeking support for my proposal I discovered that 1Password has created a tool for a similar problem. However, they are approaching the problem from Rust whereas I am from Swift.

I have a good working knowledge of Swift, but essentially zero working knowledge of Rust. For example: I believe I loosely understand what FFI is. I can kind of grasp what is being said about syn[sp?] AST. I recall reading about Serde when I learned about SCALE. I have no idea what REPL is and this is the first time I have even heard the term.

I am operating on limited/incomplete understanding of Rust and Substrate.

That said, I would like to ask for you help in evaluating the technical merit of my proposal with this new-to-me found knowledge and your expertise.

Here is the YouTube video for the 1Password tool: 1Password Developer Fireside Chat: Typeshare Overview

  • syn AST (15:30)
  • Typeshare tool (12:48)
  • TypeScript type generation (16:16)
  • Swift type generation (17:42)
  • Kotlin type generation (18:51)

The GitHub repo for Typeshare can be found here.

My Swift codegen repo can be found here.

Please note that my repo is based on a factory design pattern. A more recent refactored version is demonstrated here: [Completed Work] Feasibility Analysis of Dynamic Type Generation

I am strongly advocating for a native Swift tool and Swift language SDK is to preempt Apple App Store Review Guidelines Section 4.7

Basically, Apple does not allow developers to inject dynamic code that alters functionality. JavaScipt is the exception, but it is restricted to the WebKit browser engine. Cross-platform frameworks such as Flutter, which is based on Google Dart, basically compile down to swift binaries that are then distributed in final app form.

I would like to get feedback from Rust, TypeScript, Swift, and Kotlin developers as this is conceptually relevant to anyone interested in building front-end interfaces for Polkadot.

Questions:

  • Do you think codegen is a good/bad idea?
  • Do you think language specific SDKs are a good/bad approach for Polkadot front-end developers?
  • Do you see any technical blindspots that I am missing?
  • Would you suggest pursuing a different approach?

I am particularly interested in answers to the questions above but open to all feedback. Thank you for your time!