jsf
1.2.1, released 7 weeks ago by abandoft.com
High-performance JavaScript engine plugin for Flutter with QuickJS.
What it does
Provides a high-performance JavaScript engine out of the box in Flutter across multiple platforms. Supports evaluating scripts, automatic type conversion between Dart and JavaScript, callbacks, promises, modules, and a native fetch API.
AI-written summary of version 1.2.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to run JavaScript code inside a Flutter application.
- You want to execute scripts with support for memory limits, execution timeouts, and async promises.
Skip it when
- You are running heavy scripts that require full browser DOM APIs beyond what QuickJS provides.
- You want a pure Dart interpreter without native platform dependencies.
Strengths
- Up-to-date QuickJS support with full cross-platform capability including Web and OpenHarmony.
- Automatic type conversion and support for handles, promises, and Dart-JS function binding.
Weaknesses
- Synchronous execution time limits, memory limits, and stack limits throw UnsupportedError on Web.
- Requires managing handles and explicitly disposing resources.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
None
import 'package:jsf/jsf.dart';
final js = JsRuntime();
print(js.eval('40 + 2')); // 42
js.dispose();Alternatives
Packages that do the same job and could replace jsf.
- flutter_js
JavaScript engine for Flutter using QuickJS and JavaScriptCore via FFI.
61Compare - liquify
A powerful and extensible Liquid template engine for Dart.
72Compare - antlr4
Dart runtime libraries for ANTLR 4 parser generator.
50Compare - matrices
High-performance matrix computation and linear algebra library with built-in SIMD support.
60Compare
Works with
Packages commonly used together with jsf: ones it builds on, ones built on it, and its own family.