Open
Description
Currently FFIgen uses dart:io
directly.
This forces our FFIgenPad prototype to use IOOverrides.
If we were to use package:file
, we could potentially wire up all File reads and writes using a FileSystem
that targets the emscripten file system when we use WASM.
Since this is a more general problem than just our use case, I've gone ahead and file an issue on the Dart SDK to see if others think that would be a good direction to go in:
So let's wait on some feedback there before we head in this direction. (marking issue low prio)
Note, it would be tempting to run the the whole of FFIgen with a MemoryFileSystem and make our test suite blazing fast. However, that doesn't work due to libclang wanting to read from the LocalFileSystem
.