FFI UNIVERSE
FFI UNIVERSE Standarization FFI will bring support cross platform same style api for boost project
Copyright (c) 2024 GLOBAL CORPORATION - GENERAL DEVELOPER
📚️ Docs
- Documentation
- Youtube
- Telegram Support Group
- Contact Developer (check social media or readme profile github)
🔖️ Features
- x📱️ Cross Platform support (Device, Edge Severless functions)
- x📜️ Standarization Style Code
- x⌨️ Cli (Terminal for help you use this library or create project)
- x🔥️ Api (If you developer bot / userbot you can use this library without interact cli just add library and use 🚀️)
- x🧩️ Customizable Extension (if you want add extension so you can more speed up on development)
- x✨️ Pretty Information (user friendly for newbie)
❔️ Fun Fact
- This library 100% use on every my create project (App, Server, Bot, Userbot)
📈️ Proggres
- 10-02-2025 Starting Release Stable With core Features
📥️ Install Library
- Dart
dart pub add ffi_universe
🚀️ Quick Start
Example Quickstart script minimal for insight you or make you use this library because very simple
import 'dart:convert';
import 'package:ffi_universe/ffi_universe.dart';
typedef MainFunctionNative = Int Function(Int argc, Pointer<Pointer<Char>> argv);
typedef MainFunctionDart = int Function(int argc, Pointer<Pointer<Char>> argv);
typedef TestFunctionNative = Void Function(Pointer<Char> text);
typedef TestFunctionDart = void Function(Pointer<Char> text);
typedef InvokeFunctionNative = Pointer<Char> Function(Pointer<Char> parameters);
typedef InvokeFunctionDart = Pointer<Char> Function(Pointer<Char> parameters);
void main() async {
  final DynamicLibrary dynamicLibrary = await FFIUniverse.open(
    path: "libraryname",
  );
  /// main_function
  {
    final List<String> arguments = [
      "",
      "--help",
      "name",
    ];
    final MainFunctionDart mainFunction = dynamicLibrary.lookupFunction<MainFunctionNative, MainFunctionDart>("main");
    mainFunction(arguments.length, arguments.toNativeVectorChar());
  }
  /// test_function
  {
    final String text = "Hello";
    final Pointer<Utf8> textNative = text.toNativeUtf8();
    final TestFunctionDart testFunction = dynamicLibrary.lookupFunction<TestFunctionNative, TestFunctionDart>("test");
    testFunction(textNative.cast<Char>());
    malloc.free(textNative);
  }
  /// invoke_function
  {
    final Map<String, dynamic> parameters = {
      "@type": "getVersion",
    };
    final Pointer<Utf8> parametersNative = json.encode(parameters).toNativeUtf8();
    final InvokeFunctionDart invokeFunction = dynamicLibrary.lookupFunction<InvokeFunctionNative, InvokeFunctionDart>("invoke");
    final Pointer<Char> resultInvoke = invokeFunction(parametersNative.cast<Char>());
    print(resultInvoke.cast<Utf8>().toDartString());
    malloc.free(parametersNative);
  }
  dynamicLibrary.close();
}
Copyright (c) 2024 GLOBAL CORPORATION - GENERAL DEVELOPER
Libraries
- extension/extensions
- extension/list
- ffi/ffi
- ffi/io/io
- ffi/wasm/core/ffi/abi
- ffi/wasm/core/ffi/allocation
- ffi/wasm/core/ffi/annotations
- ffi/wasm/core/ffi/dynamic_library
- ffi/wasm/core/ffi/exceptions
- ffi/wasm/core/ffi/extensions
- ffi/wasm/core/ffi/invoker_generated
- ffi/wasm/core/ffi/marshaller
- ffi/wasm/core/ffi/memory
- ffi/wasm/core/ffi/modules/emscripten_module
- ffi/wasm/core/ffi/modules/module
- ffi/wasm/core/ffi/modules/standalone_module
- ffi/wasm/core/ffi/native_callable
- ffi/wasm/core/ffi/native_finalizer
- ffi/wasm/core/ffi/null_memory
- ffi/wasm/core/ffi/type_utils
- ffi/wasm/core/ffi/types
- ffi/wasm/core/ffi_utils/allocation
- ffi/wasm/core/ffi_utils/arena
- ffi/wasm/core/ffi_utils/utf8
- ffi/wasm/core/ffi_utils/utf16
- ffi/wasm/core/js_utils/inject_js
- ffi/wasm/core/js_utils/wasm_interop
- ffi/wasm/ffi/ffi
- ffi/wasm/ffi/utf8
- ffi/wasm/wasm
- Foreign Function Interface for interoperability with the C programming language.
- ffi_universe
- ffi_universe_core
- utils/utils
- utils/vector/vector
