Frequently asked questions
Short answers to the questions people ask first, each with a link to the details.
Can I use Lucent in production?
Section titled “Can I use Lucent in production?”Not yet. It's experimental, its APIs change without a migration path, and it hasn't been tested on physical devices. The roadmap tracks what's left.
Does it work in Expo Go?
Section titled “Does it work in Expo Go?”No: Lucent adds native code, which Expo Go can't load. Use a development build, with npx expo run:ios or EAS Build (Install Lucent).
Is my module's code in the JS bundle?
Section titled “Is my module's code in the JS bundle?”No. Metro bundles a small proxy instead, and the code runs as C++ in the app binary (How a module becomes native code).
Can a module import npm packages?
Section titled “Can a module import npm packages?”Only other modules, lucent:* modules, and Lucent packages' modules. JavaScript code around it can import anything, as usual (Language features).
Is it faster than JavaScript?
Section titled “Is it faster than JavaScript?”For work on data that stays in native code, often by a lot. Copying large data across the boundary can cost more than it saves: measure with lucent bench (Design the boundary first).
Can I call any iOS or Android API?
Section titled “Can I call any iOS or Android API?”Most of them, typed from your installed SDKs. Some aren't bound yet, such as Swift-only APIs and Android generic classes' members (SDK types).
Do I still need Xcode and Android Studio?
Section titled “Do I still need Xcode and Android Studio?”You need their SDKs, to build the app and to type the SDK imports. You don't write Swift, Kotlin or Objective-C (Compatibility).
How do I debug a module?
Section titled “How do I debug a module?”Errors reach JavaScript with their .lucent.ts line, and native crashes point at your source (Debug a crash).
Can I publish a library written in Lucent?
Section titled “Can I publish a library written in Lucent?”Yes: an npm package that ships its modules as source, compiled by each app that installs it (Publish a Lucent library).
How does it compare with Nitro or Expo Modules?
Section titled “How does it compare with Nitro or Expo Modules?”They have you write Swift, Kotlin or C++; Lucent has you write TypeScript. The comparison has the details.