Skip to main content

Generate Kotlin/Java, JNI C/C++, and JSI modules for Supernote plugins

Project description

Supernote Module Generator

Generate Kotlin/Java, JNI C/C++, and synchronous JSI modules inside an existing Supernote React Native plugin. You write the implementation; the generator owns the bridge, native registration, build wiring, TypeScript declarations, and React Native autolinking.

Module types

Module type Best suited to JavaScript call model
Native Module For coding in Kotlin/Java and/or using Android APIs. Value returns are asynchronous promises.
Native JNI Module For combining Android APIs with existing or performance-intensive C/C++ code. Value returns are asynchronous promises.
JSI Module For low-latency synchronous calls from JavaScript. Calls execute synchronously on the JavaScript thread.

Install

python3 -m pip install supernote-module-generator

Run the command from an existing Supernote plugin root:

supernote-module

Choose Add module, select a module type, enter the local package name, and accept or edit the suggested JavaScript name, Android namespace, and package version. The generated module contains a README with its exact source paths, first export example, JavaScript call, ownership boundaries, and build steps.

To inspect the development environment without changing the project:

supernote-module doctor

For exact command grammar and defaults:

supernote-module help <command>

Requirements

  • Python 3.9 or newer.
  • An existing Supernote plugin containing PluginConfig.json, package.json, and an android directory.
  • JDK 17 and Android SDK 35. Generated packages use minSdk 27.
  • Node.js plus npm or Yarn for local dependency installation.
  • Android NDK Clang and CMake 3.22.1 or newer for JNI and JSI modules.
  • An arm64-v8a Supernote target.

Safety

Update preserves user-owned Kotlin/Java or C/C++ implementation source and replaces generator-owned infrastructure. Remove deletes the complete module, including implementation source, so commit or back it up first.

Validation is structural unless --build is supplied. npm/Yarn links the local package but does not compile or deploy the Android plugin.

Output modes

Normal output is designed for interactive terminals. --plain provides deterministic ASCII output without elapsed-time text, --quiet produces a minimal human result, and --json emits one schema-versioned JSON document.

This project is licensed under the MIT License.

Source code and issues are available at github.com/Ziv-Ink/supernote-module-generator.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

supernote_module_generator-1.0.0.tar.gz (179.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

supernote_module_generator-1.0.0-py3-none-any.whl (114.5 kB view details)

Uploaded Python 3

File details

Details for the file supernote_module_generator-1.0.0.tar.gz.

File metadata

File hashes

Hashes for supernote_module_generator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5bed97ba1163607c6200fcb24386d668f54309f24fbc969ac45f52600b6a0591
MD5 9f852274f993d2d1e85cc5ae7c69c456
BLAKE2b-256 87fbbd93ef3affea86a0af468831ddc876484453d8bc908d8bf6f74bdb6b134e

See more details on using hashes here.

Provenance

The following attestation bundles were made for supernote_module_generator-1.0.0.tar.gz:

Publisher: publish.yml on Ziv-Ink/supernote-module-generator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file supernote_module_generator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for supernote_module_generator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 612bce68715f92775887d4e397ae8230c4d86015d38a2f76ae4c7f05f11771e7
MD5 58370c145c02d1f22c9f7c80f13f8775
BLAKE2b-256 909a6c04e82f11a3201cdbec5072a7f6263188aab632fde026a47b4f246f1f2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for supernote_module_generator-1.0.0-py3-none-any.whl:

Publisher: publish.yml on Ziv-Ink/supernote-module-generator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page