dart2tinygo 0.0.1
dart2tinygo: ^0.0.1 copied to clipboard
Transpiles a subset of Dart into TinyGo source code so it can run on microcontrollers. CLI (`dart2tinygo build/check`) plus the conversion engine.
dart2tinygo (package) #
Languages: English | 日本語
The CLI and the Dart → Go transpiler engine itself.
bin/: CLI entry point (build,check, andflashimplemented)lib/src/frontend/: Parsing and resolved AST retrieval (implemented, viapackage:analyzer'sAnalysisContextCollection)lib/src/checker/: Detection and error reporting for unsupported syntax (implemented for the v0.1 minimal subset)lib/src/ir/: Intermediate representation (optional, not used yet — the backend walks the resolved AST directly)lib/src/backend/: Go code generation (implemented for the v0.1 minimal subset)test/golden/: Golden tests comparing*.dartinput to*.goexpected output
Status: the v0.1 minimal subset is implemented — a single void main()
with int locals, while (true), print(...), and sleep(Duration(...)).
See docs/supported_features.md for the
exact scope and docs/mapping.md for the
conversion rules.
dart run bin/dart2tinygo.dart check <entry.dart>
dart run bin/dart2tinygo.dart build <entry.dart> [-o out_dir]
dart run bin/dart2tinygo.dart flash <entry.dart> --target=<tinygo-target> [-o out_dir] [--port=<port>]
See CONTRIBUTING.md for the design principles and workflow.