dart2tinygo 0.0.2 copy "dart2tinygo: ^0.0.2" to clipboard
dart2tinygo: ^0.0.2 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 | 日本語

pub package

The CLI and the Dart → Go transpiler engine itself.

  • bin/: CLI entry point (build, check, and flash implemented)
  • lib/src/frontend/: Parsing and resolved AST retrieval (implemented, via package:analyzer's AnalysisContextCollection)
  • lib/src/checker/: Detection and error reporting for unsupported syntax (implemented for the v0.0.2 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.0.2 subset)
  • test/golden/: Golden tests comparing *.dart input to *.go expected output

Status: v0.0.2 is implemented. See docs/supported_features.md for the exact scope and docs/mapping.md for the conversion rules.

dart pub global activate dart2tinygo   # once

dart2tinygo check <entry.dart>
dart2tinygo build <entry.dart> [-o out_dir]
dart2tinygo flash <entry.dart> --target=<tinygo-target> [-o out_dir] [--port=<port>]

See CONTRIBUTING.md for the design principles and workflow.

0
likes
135
points
342
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Transpiles a subset of Dart into TinyGo source code so it can run on microcontrollers. CLI (`dart2tinygo build/check`) plus the conversion engine.

Repository (GitHub)
View/report issues
Contributing

Topics

#embedded #tinygo #microcontroller

License

BSD-3-Clause (license)

Dependencies

analyzer, args, path

More

Packages that depend on dart2tinygo