-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
An example that uses `dart_api_dl.h`. | ||
An example that uses the [C API of the Dart VM]. | ||
|
||
Open TODO is to pass the path to the include folder rather than copying it in. | ||
https://github.com/dart-lang/native/issues/839 | ||
The example shows how to pass an object from the Dart heap to native code and | ||
hold on to it via a `PersistentHandle`. For more documentation about handles, | ||
and the other C API features refer to the documentation in the header files. | ||
|
||
## Usage | ||
|
||
Run tests with `dart --enable-experiment=native-assets test`. | ||
|
||
## Open TODOs | ||
|
||
It would be better to receive a path the include folder containing the C API | ||
rather than having to copy it into the `src/` directory. | ||
|
||
* https://github.com/dart-lang/native/issues/839 | ||
|
||
[C API of the Dart VM]: https://github.com/dart-lang/sdk/tree/main/runtime/include |