A template to quickly get you creating an open-source native-module micropython library with linting and CI to automatically build binaries.
To use this template, click the green "Use this template" button in the github web interface. Then run:
git clone YOUR_REPO
# then cd into your local repo, and run:
./bootstrap
And follow the on-screen prompts. bootstrap
uses some git data (like detecting your username and repository name), so cloning the repo generated from the template is necessary.
General sanity checks and best practices are performed on provided responses. To disable these, run with the --no-verify
flag:
./bootstrap --no-verify
The resulting repository will contain a terse FNV1a32 hash-function implementation, demonstrating various native-module features.
Please reference the official micropython native-module examples for more documentation.
This template's bootstrap
functionality only works on MacOS/Linux/WSL, it will not work natively on windows.
- GitHub Actions to build & test native modules.
- Prebuilt binaries will be automatically uploaded to the release page on semver tag (
vX.Y.Z
). - Go to your repo's github settings, go under
Actions>General>Workflow permissions
and check the radiobox forRead and write permissions
.
- Prebuilt binaries will be automatically uploaded to the release page on semver tag (
- Pre-commit for various sanity checks.
- Preconfigured
Makefile
to automatically add python and C sources. - Unix-port unit testing (with dev dependencies handled by Belay).
- A benchmark starter-script for measuring native module performance on a real micropython microcontroller board.
If you find this in the git history of a project and you like the structure, visit this template at https://github.com/BrianPugh/micropython-native-module-template .