from day one by building with Flutter on iOS and Android simultaneously, without sacrificing features, quality, or performance. Web Easily reach more users in browsers with the same experience as on mobile devices through the power of Flutter on the web. Desktop & Embedded Build high-quality desktop apps without compromising compatibility or performance. Flutter's support for custom embedders means you can create new ways to put Flutter to work on the platforms that matter to you. 6
targeting mobile and desktop devices, Dart includes both a Dart VM with just-in-time (JIT) compilation and an ahead-of-time (AOT) compiler for producing machine code. Web platform: For apps targeting the web, Dart can compile for development or production purposes. Its web compiler translates Dart into JavaScript.
mechanism by which a program written in one programming language can call routines or make use of services written or compiled in another one. An FFI is often used in contexts where calls are made into binary dynamic-link library. 14
<script> // The value below is injected by flutter build, do not touch. const serviceWorkerVersion = null; </script> <!-- This script adds the flutter initialization JS code --> <script src="flutter.js" defer></script>
open-source software for build automation, testing, packaging and installation of software by using a compiler-independent method. CMake is not a build system itself; it generates another system's build files • make ◦ Make is a build automation tool that builds executable programs and libraries from source code by reading files called makefiles which specify how to derive the target program. • gcc • etc..
compiler identification is AppleClang 15.0.0.15000040 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Configuring done (1.1s) -- Generating done (0.0s) -- Build files have been written to: /hello_world_library jaichang@PARKui-MacBookPro % make [ 25%] Building C object CMakeFiles/hello_world_library.dir/hello.c.o [ 50%] Linking C shared library libhello.dylib [ 50%] Built target hello_world_library [ 75%] Building C object CMakeFiles/hello_test.dir/hello.c.o [100%] Linking C executable hello_test [100%] Built target hello_test
*a - b; } int *multiply(int a, int b) { int *mult = (int *)malloc(sizeof(int)); *mult = a * b; return mult; } C&C++ int subtract(int *a, int b); int *multiply(int a, int b);
*a - b; } int *multiply(int a, int b) { int *mult = (int *)malloc(sizeof(int)); *mult = a * b; return mult; } C&C++ int subtract(int *a, int b); int *multiply(int a, int b);
int subtract(int *a, int b); typedef SubtractFunc = Int32 Function(Pointer<Int32> a, Int32 b); typedef Subtract = int Function(Pointer<Int32> a, int b); final subtractPointer = dylib.lookup<NativeFunction<SubtractFunc>>('subtract'); final subtract = subtractPointer.asFunction<Subtract>(); dart
int subtract(int *a, int b); typedef SubtractFunc = Int32 Function(Pointer<Int32> a, Int32 b); typedef Subtract = int Function(Pointer<Int32> a, int b); final subtractPointer = dylib.lookup<NativeFunction<SubtractFunc>>('subtract'); final subtract = subtractPointer.asFunction<Subtract>(); dart
int subtract(int *a, int b); typedef SubtractFunc = Int32 Function(Pointer<Int32> a, Int32 b); typedef Subtract = int Function(Pointer<Int32> a, int b); final subtractPointer = dylib.lookup<NativeFunction<SubtractFunc>>('subtract'); final subtract = subtractPointer.asFunction<Subtract>(); dart