• Daco Harkes's avatar
    Native assets support for Linux (#134031) · 2337c64d
    Daco Harkes authored
    Support for FFI calls with `@Native external` functions through Native assets on Linux. This enables bundling native code without any build-system boilerplate code.
    
    For more info see:
    
    * https://github.com/flutter/flutter/issues/129757
    
    ### Implementation details for Linux.
    
    Mainly follows the design of https://github.com/flutter/flutter/pull/130494.
    
    Some differences are:
    
    * Linux does not support cross compiling or compiling for multiple architectures, so this has not been implemented.
    * Linux has no add2app.
    
    The assets copying is done in the install-phase of the CMake build of a flutter app.
    CMake requires the native assets folder to exist, so we create it also when the feature is disabled or there are no assets.
    
    ### Tests
    
    This PR adds new tests to cover the various use cases.
    
    * packages/flutter_tools/test/general.shard/linux/native_assets_test.dart
      * Unit tests the Linux-specific part of building native assets.
    
    It also extends various existing tests:
    
    * packages/flutter_tools/test/integration.shard/native_assets_test.dart
      * Runs (incl hot reload/hot restart), builds, builds frameworks for Linux and flutter-tester.
    2337c64d
Name
Last commit
Last update
..
app Loading commit data...
app_integration_test/integration_test Loading commit data...
app_shared Loading commit data...
app_test_widget/test Loading commit data...
cocoapods Loading commit data...
module Loading commit data...
package Loading commit data...
package_ffi Loading commit data...
plugin Loading commit data...
plugin_ffi Loading commit data...
plugin_shared Loading commit data...
skeleton Loading commit data...
xcode/ios/custom_application_bundle Loading commit data...
README.md Loading commit data...
template_manifest.json Loading commit data...