tree: a570c4c00590a7252ac1fe79c6c0f84eb13ea4af [path history] [tgz]
  1. lib/
  2. test/
  3. BUILD.gn
  4. CHANGELOG.md
  5. pubspec.lock
  6. pubspec.yaml
  7. README.md
mojo/dart/mojom/README.md

mojom

This package is a placeholder for generated mojom bindings. It contains a script lib/generate.dart.

This script generates Mojo bindings for a Dart package. Dart packages will be populated according to the DartPackage annotations in .mojom files. Any .mojom files that don‘t have an annotation will have their bindings generated into a local copy of the ‘mojom’ package. Annotations specifying the host package will cause generation into the host package’s lib/ directory. For every other DartPackage annotation, the bindings will be generated into the named package, either into the global package cache if a package of that name has already been fetched, or into a local directory created under the current package's packages/ directory.

Generated Mojo bindings in other pub packages should be installed into this package by saying the following after pub get:

$ dart -p packages packages/mojom/generate.dart

If desired, additional directories holding .mojom.dart files can be specified; their contents will be installed to this package as well:

$ dart -p packages packages/mojom/generate.dart -a </path/to/mojom/dir>

Full options:

$ dart packages/mojom/generate.dart [-p package-root]
                                    [-a additional-dirs]
                                    [-m mojo-sdk]
                                    [-g]  # Generate from .mojom files
                                    [-d]  # Download from .mojoms files
                                    [-i]  # Ignore duplicates
                                    [-v]  # verbose
                                    [-f]  # Fake (dry) run