Skip to content

Instantly share code, notes, and snippets.

View ykmnkmi's full-sized avatar
🎯
Focusing

Olzhas Suleimen ykmnkmi

🎯
Focusing
  • Kazakhstan, Almaty
  • 09:46 (UTC +05:00)
View GitHub Profile
const std = @import("std");
const Allocator = std.mem.Allocator;
pub const Error = error{
EndOfStream,
Utf8InvalidStartByte,
} || std.fs.File.ReadError || std.fs.File.SeekError || std.mem.Allocator.Error;
pub fn Parser(comptime Value: type, comptime Reader: type) type {
return struct {
@espresso3389
espresso3389 / flutter-ffi-async-nativeport.md
Last active April 5, 2024 11:30
Async messaging between Flutter and C++ using Dart ffi NativePort

C++

  • Copy Dart SDK (${FLUTTER_DIR}/bin/cache/dart-sdk/include) to your project, e.g. ios/Classes/
  • Add your own code like the following fragment
#include "dart_api_dl.h"

// Receives NativePort ID from Flutter code
static Dart_Port_DL dart_port = 0;