| { |
| include: [ |
| // Required to write to the system log. |
| "syslog/client.shard.cml", |
| // Required to load the Vulkan shared library. |
| "vulkan/client.shard.cml", |
| ], |
| program: { |
| // The embedder is a ELF binary that runs using the ELF runner. |
| // The binary takes a single argument which is the path to the |
| // Flutter app asset bundle to run. |
| runner: "elf", |
| binary: "bin/embedder", |
| |
| // To run a Flutter app with the embedder, compile the Flutter |
| // app into an asset bundle and put that bundle in |
| // `data/flutter_assets` in the component's package. |
| args: ["/pkg/data/flutter_assets"], |
| |
| // Required for `std::cout` and `std::cerr` to print to |
| // `ffx log`. |
| forward_stdout_to: "log", |
| forward_stderr_to: "log", |
| |
| // Required for JIT execution. |
| job_policy_ambient_mark_vmo_exec: "true", |
| }, |
| capabilities: [ |
| { |
| protocol: [ |
| // For rendering. |
| "fuchsia.ui.app.ViewProvider", |
| ], |
| }, |
| ], |
| expose: [ |
| { |
| protocol: [ |
| // For rendering. |
| "fuchsia.ui.app.ViewProvider", |
| ], |
| from: "self", |
| to: "parent" |
| }, |
| ], |
| use: [ |
| { |
| protocol: [ |
| // For connecting to system font provider. |
| "fuchsia.fonts.Provider", |
| // For the Dart VM service. |
| "fuchsia.posix.socket.Provider", |
| // For allocating memory for graphics surfaces, |
| // where memory needs to come from sysmem. |
| "fuchsia.sysmem.Allocator", |
| // For allocating memory for Flatland. |
| "fuchsia.ui.composition.Allocator", |
| // For compositing/presenting views. |
| "fuchsia.ui.composition.Flatland", |
| // For connecting to the Ime service. |
| "fuchsia.ui.input.ImeService", |
| // For connecting to the Keyboard service. |
| "fuchsia.ui.input3.Keyboard", |
| "fuchsia.ui.scenic.Scenic", |
| ] |
| }, |
| ], |
| } |