Skip to content

Support for Custom Embedders with Non-standard File I/O #93838

@ds84182

Description

@ds84182

Use case

Many platforms, Android included, may store or manage files using non-standard File APIs. In some cases these may map nicely to existing APIs (for ex Win32), but in some cases these may not fit as well (for ex Android NDK AAsset, HTTPS, FTP, etc).

Proposal

To allow Flutter to become more portable for custom embedders without a standard filesystem, I propose the following changes:

  • Expose AssetResolver through Embedder API (Embedder Asset Provider engine#29802)
  • Allow PersistentCache to be overridden/provided by the Embedder
  • Add GN configuration options for linking with Dart without dart:io
  • Add C define (tentatively FLUTTER_NO_IO) to ifdef out I/O dependent parts of Engine and FML

This should allow builds of Flutter with embedder-provided I/O. Of course, deeper changes are needed in dependencies like Dart when the target platform is "barely POSIX" but this is out of scope for this issue.

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilitye: embedderUsers of the Embedder APIengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions