Skip to main content

Module export_pkg

Module export_pkg 

Source
Expand description

Pure, deterministic package manifest, entrypoint, Apple export anchor, and dynamic iOS .framework Info.plist emitters for web-pkg, rn-pkg, and nitro-ui-pkg.

Backed by compile-time checked Askama templates under packages/core/codegen/templates/export_pkg/.

Structs§

ExportPackageMeta
Common metadata for rendering an embeddable package manifest.
IosFrameworkPlistMeta
Metadata for rendering an iOS dynamic .framework Info.plist.

Functions§

emit_android_library_manifest_xml
Emits AGP 8+ clean library <pkg>/android/src/main/AndroidManifest.xml.
emit_apple_export_anchor_h
Emits NvExportAnchor.h declaring C anchor functions returning each view’s nv_get_interface* function pointer (never anchors nv_runtime_get_interface).
emit_apple_export_anchor_m
Emits NvExportAnchor.m resolving each view’s <vtable_sym> from its own isolated dynamic <Mod>Core.framework via dlopen(RTLD_NOW | RTLD_LOCAL) + dlsym (cached with dispatch_once).
emit_ios_framework_info_plist
Emits a minimal valid Info.plist for a dynamic iOS .framework slice inside an .xcframework.
emit_nitro_android_build_gradle
Emits thin <pkg>/android/build.gradle registering ONLY this component’s src/main/jniLibs.
emit_nitro_package_swift
Emits thin <pkg>/Package.swift depending on sibling ../app-nvehost (NativeViewHost, NativeViewAppleHost) plus this component’s dynamic <Mod>Core.xcframework and <Mod>Anchor C target.
emit_nitro_pkg_index_ts
Emits <pkg>/src/index.ts re-exporting every Nitro UI view registration and typed spec. Multi-view specs emit explicit non-colliding named exports so shared enums/structs avoid TS2308.
emit_nitro_pkg_package_json
Emits <pkg>/package.json matching margelo/nitro-ui 0.3.0 bare packages with @nativeview/nitro-ui peer.
emit_rn_android_build_gradle
Emits thin <pkg>/android/build.gradle depending on :nativeview_react-native (zero Compose).
emit_rn_pkg_index_ts
Emits <pkg>/src/index.ts re-exporting every Fabric NativeComponent & Commands handle (aliased exports for multi-view specs avoid TS2308 collisions on NativeProps/Commands).
emit_rn_pkg_package_json
Emits <pkg>/package.json with React Native Fabric codegenConfig and @nativeview/rn peer.
emit_rn_podspec
Emits thin <pkg>/<IosModuleName>.podspec depending on NativeViewReactNative.
emit_web_pkg_index_ts
Emits <pkg>/src/index.ts re-exporting every custom element, React wrapper, and type. Multi-view specs emit explicit non-colliding named exports so shared enums/structs avoid TS2308.
emit_web_pkg_package_json
Emits <pkg>/package.json for --target web-pkg declaring @nativeview/web as a peerDependency.
emit_web_pkg_tsconfig_json
Emits <pkg>/tsconfig.json for strict typechecking of the generated web-pkg.
xml_escape
Escapes XML special characters for plist/manifest attribute and element text.