dart-lang / dart-lang/samples

FFI asynchronous callback samples

Open
#110 0 comments 3 reactions 0 assignees View on GitHub
area-ffi type-enhancement
Dominant language
Dart
Stars
656
Forks
228
Avg merge
19h 14m
Merged PRs (30d)
4

Description

We might want to add a sample for asynchronous callbacks to this repo. This requires compiling against `dart_api(_dl).h`.

See the samples in the SDK repo:

* Dart code: https://github.com/dart-lang/sdk/tree/master/samples/ffi/async
* C code: https://github.com/dart-lang/sdk/blob/master/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc

Context: https://github.com/dart-lang/sdk/issues/46135

Contributor guide

Open the contributing guide

Research direction

Start by reading the Dart and C async FFI samples linked from the issue, along with the referenced Dart SDK issue 46135. Identify how those samples compile against dart_api(_dl).h and adapt the example for this repository. Done means the repository contains an asynchronous callback sample that builds and demonstrates the documented behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, dart
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.