Skip to content

A library with integrated JavaScript engine and extension utils for Flutter Apps.

License

Notifications You must be signed in to change notification settings

openwebf/mercury

Repository files navigation

mercury

QuickJS bindings and web-compliant polyfills wrapped up in flutter library with legacy behind it. Aims to be an efficient & fully-featured library to run JavaScript in a flutter app, from simple eval to acting as the app's logic/backend core.

Eventually, this library will be used by https://github.com/openwebf/webf as a superset to provide DOM interactions and rendering. This should also encourage better maintenance, as WebF contributors iterating on the JS core of the framework will contribute here. See #16

Installation

It's best if you have pnmp installed, in which case run:

pnpm install

If you only have npm installed, disregard the various warnings

Once installed, you can build all operating systems like this:

npm run build:bridge:all

or any particular one by replacing all above with any of: macos, linux, android, windows or ios, and any of these can be suffixed with :release to build production-ready versions of the bridge

Example

We provide an example you can run like this:

cd mercury/example
flutter run

and if you want to play with the Javascript, edit the assets/bundle.js file

Prior Art

Dependant Projects

About

A library with integrated JavaScript engine and extension utils for Flutter Apps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published