# Lucent roadmap Lucent compiles TypeScript modules to C++ that React Native calls through JSI. The website's [roadmap](https://lucent-lang.dev/docs/roadmap/) is generated from this file, so each item is one short line. โœ… done ยท ๐Ÿšง in progress ยท โณ next ยท ๐Ÿ”ญ later ## M0: Foundations Goal: A module runs as C++ in a bare React Native app and an Expo app, on iOS and Android. - โœ… A C++ runtime with JavaScript's numbers, strings, arrays, maps, sets and errors. - โœ… One C++ TurboModule, autolinked on iOS and Android. - โœ… The compiler: the TypeScript checker, then C++ with `#line` back to the source. - โœ… `lucent build`, the Metro integration and the Expo config plugin. - โœ… Every language feature tested against the same code run as JavaScript. ## M1: The language Goal: Self-contained modules, such as parsers, codecs and data structures. - โœ… Statements, expressions, destructuring and template literals. - โœ… Object types, unions, narrowing, enums and generics. - โœ… Classes with inheritance and interfaces, closures, generators, regular expressions and JSON. - โœ… `async` and `await` off the JS thread, `AbortSignal`, JS callbacks and promises. - โœ… Lucent code runs one piece at a time, so it has no data races. ## M2: Platform APIs Goal: Call the iOS and Android SDKs directly from Lucent. - โœ… SDK types read from your Xcode and Android SDK on first import, then cached. - โœ… One module for both platforms, with platform branches; platform files as an option. - โœ… Delegates, listeners and blocks; completion handlers as promises. - โœ… Android classes extended in Lucent, and Android version checks at compile time. - โœ… iOS main-thread-only APIs checked at compile time. - โœ… Libraries the app links: its pods on iOS, its Gradle dependencies on Android. - โœ… Lucent packages on npm, with `lucent.json` for their native needs. - โœ… Ports of nine Expo and community modules, checked against the originals. - โณ Android generics, such as `Consumer`, and `java.util` collections. - โณ `Task` and `ListenableFuture` as promises, and the current `Activity`. - ๐Ÿ”ญ Swift-only and Kotlin-only APIs, and subclassing iOS classes. - ๐Ÿ”ญ iOS version checks at compile time. - ๐Ÿ”ญ Weak references, and `using` for sessions and files. - ๐Ÿ”ญ Swift Package Manager libraries. - ๐Ÿ”ญ Pinning an SDK version, and listing what an SDK update changes for your code. - ๐Ÿ”ญ Rarer SDK types, such as pointers and selectors, as ports need them. ## M3: Views Goal: Native views from Lucent components. - ๐Ÿ”ญ SwiftUI or UIKit views and Compose or Android views, on Fabric. ## M4: Production Goal: Ready for apps in production. - โœ… `@lucent-lang/lucent` on npm, published from CI with provenance. - โœ… Incremental builds, and rebuilds as you edit. - โœ… Crashes and errors that point at `.lucent.ts` lines. - โœ… Lucent's errors in the editor. - ๐Ÿšง Performance budgets in CI. - โณ Testing on physical devices; today, simulators and emulators. - โœ… A JavaScript `lucent:core`, so Jest and Vitest can run shared modules. ## Not planned - Running JavaScript in native code: there's no JavaScript engine there. - Reflection, `eval` and prototypes. - Freeing reference cycles by itself.