knowa_kernel 2.1.0
knowa_kernel: ^2.1.0 copied to clipboard
The runtime that executes Knowa code-push patches inside a Flutter app. Dependency-free. You do not depend on it directly: knowa_sdk does.
knowa_kernel #
The runtime that executes Knowa code-push patches inside a Flutter app.
You do not depend on this package directly. Add
knowa_sdk, which depends on it, and
use the Knowa CLI to build and publish patches:
curl -fsSL https://knowa.knowalabs.com/install.sh | sh
flutter pub add knowa_sdk
knowa init
What it is #
A patch is compiled on your build machine by the Knowa CLI, signed with your
key, and delivered to the app. knowa_sdk verifies the signature and hands
the patch to this runtime, which runs the functions and methods it replaces.
Everything a patch does not replace runs as compiled into your app.
- No dependencies. It ships inside every app that uses Knowa, so it imports
nothing but
dart:coreanddart:async. - Values are ordinary Dart objects. An
intis anintand aFutureis aFuture, so patched and shipped code call each other — including acrossawait— without conversion. - What it cannot do, it says. A construct the runtime cannot execute is refused by name when the patch is built. A call into your app that has no binding fails that one patched function, which falls back to your shipped code and reports what was missing.
- Slower than compiled code: right for UI and business logic, wrong for hot loops.
KBridge is the interface an app implements to let a patch reach one of its
own classes. knowa release generates those for you; knowa_sdk re-exports
the type.
Documentation: knowa.knowalabs.com.
License #
BSD-3-Clause. See LICENSE.