pub repository
mirror.p-hatan.irffi
2.1.4Utilities for working with Foreign Function Interface (FFI) code.
Readme
Build Status Coverage Status pub package package publisher
Utilities for working with Foreign Function Interface (FFI) code, incl. converting between Dart strings and C strings encoded with UTF-8 and UTF-16.
Please see the API reference for more documentation and the tests for example usage.
For additional details about Dart FFI (dart:ffi), see
https://dart.dev/guides/libraries/c-interop.
Changelog
2.1.4
- Require Dart 3.7.0 or greater to opt in to tall style formatting.
2.1.3
- Use
package:dart_flutter_team_lints. - Migrate from
DynamicLibrary.process()to@Native externalfunctions. https://github.com/dart-lang/native/issues/1401
2.1.2
- Update repository to point to dart-lang/native.
2.1.1
- Require Dart 3.3.0 or greater.
- Migrate
elementAtuse tooperator +.
2.1.0
- Require Dart 3.0.0 or greater.
- Expose native equivalent to
free(nativeFree) frommallocandcallocallocators.
2.0.2
- Fixed a typo in a doc comment.
- Added package topics to the pubspec file.
2.0.1
- Only zero out memory on successful allocation on Windows.
- Upgrade test dev dependency.
2.0.0
- Switch Windows memory allocation to use
CoTaskMemAllocandCoTaskMemFree, which will enable support forNativeFinalizer. - Require Dart 2.17.0 or greater.
1.2.1
Revert added common C integer types as ABI-specific integers. Instead, these are available in Dart 2.17.
1.2.0 (retracted)
This release requires Dart 2.16.0 or greater.
1.2.0-dev.0
Added common C integer types as ABI-specific integers. These common C integer
types will make their way into dart:ffi in 2.17 and be deprecated from this
package. Having them in this package enables using them in Dart 2.16.
This pre-release requires Dart 2.16.0-118.0.dev or greater.
1.1.2
Fixed unhandled exception in withZoneArena (#107).
1.1.1
Adds a sanity check to Pointer<Utf8> and Pointer<Utf16> extension methods
that receiver is not nullptr.
1.1.0
Adds the arena allocator.
Moves from static analysis with lints in package:pedantic to package:lints.
1.0.0
Bumping the version of this package to 1.0.0.
Removes all deprecated methods, use 0.3.0-nullsafety.3 for migration.
0.3.1-nullsafety.0
Deprecates the static methods on Utf8 and Utf16 and introduces
extension methods to replace them.
0.3.0-nullsafety.3
Adds back in deprecated allocate and free to ease migration.
These will be removed in the next release.
This pre-release requires Dart 2.12.0-259.9.beta or greater.
0.3.0-nullsafety.1
This pre-release requires Dart 2.12.0-259.8.beta or greater.
Note that this pre-release does not work in Flutter versions containing Dart
2.12.0-260.0.dev - 2.12.0-264.0.dev.
Using Allocator.call throws a NoSuchMethodError in these versions.
See Flutter Engine #23954 for more info.
0.3.0-nullsafety.0
Changes Utf8 and Utf16 to extend Opaque instead of Struct.
This means .ref is no longer available and Pointer<Utf(..)> should be used.
See breaking change #44622 for more info.
Removes allocate and free.
Instead, introduces calloc which implements the new Allocator interface.
See breaking change #44621 for more info.
This pre-release requires Dart 2.12.0-265.0.dev or greater.
0.2.0-nullsafety.1
Adds an optional named length argument to Utf8.fromUtf8().
0.2.0-nullsafety.0
Pre-release (non-stable) release supporting null safety. Requires Dart 2.12.0 or greater.
0.1.3
Stable release incorporating all the previous dev release changes.
Bump SDK constraint to >= 2.6.0.
0.1.3-dev.4
Bump SDK constraint to >= 2.6.0-dev.8.2 which contains the new API of dart:ffi.
0.1.3-dev.3
Replace use of deprecated asExternalTypedData with asTypedList.
0.1.3-dev.2
Incorporate struct API changes, drop type argument of structs.
0.1.3-dev.1
- Adds top-level
allocate<T>()andfree()methods which can be used as a replacement for the deprecatedPointer.allocate<T>()andPointer.free()members indart:ffi.
0.1.1+2
- Expand readme
0.1.1+1
- Fix documentation link
0.1.1
- Add basic Utf16 support
0.1.0
- Initial release supporting Utf8
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add ffipubspec.yaml
name: ffi
version: 2.1.4
description: Utilities for working with Foreign Function Interface (FFI) code.
repository: https://github.com/dart-lang/native/tree/main/pkgs/ffi
issue_tracker: https://github.com/dart-lang/native/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Affi
topics:
- interop
- ffi
- codegen
environment:
sdk: '>=3.7.0 <4.0.0'
dev_dependencies:
dart_flutter_team_lints: ^2.0.0
test: ^1.21.2
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | 2019-09-09T14:28:22.481918Z | Download | 21a0c71c696f44bd6fe01a689fe9031d58a75ca91109608b9d66cbaa518ace0c |
| 0.1.1 | 2019-09-09T15:59:21.857965Z | Download | af4535bcce637918771f1b37092f6fff5dee716a4e4f2ee65dd89d484b88caba |
| 0.1.1+1 | 2019-10-10T08:58:11.456034Z | Download | 4a868c9edded7b46d982840d95307f2bdfd29b766235d99082634e3d1c63d218 |
| 0.1.1+2 | 2019-10-10T09:27:02.021823Z | Download | 54123336deb392130b72ca1c871ffe80d320c690534a730bc24cb0737142aaf1 |
| 0.1.2 | 2019-10-10T09:37:24.457622Z | Download | 7470f4ba16c0a5e2036bce0d8301b337138fb1aef790f8ae922a13023f9f3507 |
| 0.1.3-dev.1 | 2019-10-10T12:52:38.049887Z | Download | dfdb9f4824b9f0a0d15c85bad9ffeadf28c9483b72358d373b8962e562e7a3c1 |
| 0.1.3-dev.3 | 2019-10-15T12:29:06.094385Z | Download | d006c8214794d404e46c0a3bbd546f18d9df2a351a0b6e46c4d48b8c38298670 |
| 0.1.3 | 2019-11-05T14:20:26.191529Z | Download | 284195c7170e7f11734fb7191d7780e837fca975ea825eb01587830fa978dd95 |
| 0.2.0-nullsafety.0 | 2020-11-16T17:10:38.803759Z | Download | 1cee497bcfc110456da6b165f439acb356b7c39d2d6b80064659ee4d7dcf42e3 |
| 0.2.0-nullsafety.1 | 2020-11-18T13:18:12.304300Z | Download | d48da174cc59435807047e9d6501370a445565acc958e0d8314854ba314c96ca |
| 0.3.0-nullsafety.0 | 2021-02-01T10:19:55.744548Z | Download | 9a5ef2382fc00e4ffce6e7abacb1c1ce6b012977e22d14ac4adfa15e08968591 |
| 0.3.0-nullsafety.1 | 2021-02-03T10:17:56.447655Z | Download | 8992f13d1cd91a57724976662fc20e89f99b25f6d8e2c2a6fcaf86e6af29d42f |
| 0.3.0-nullsafety.2 | 2021-02-09T10:16:24.294574Z | Download | c209670d75065f9865f457ecdb2e27a2145ebf27fa5d40bb1c10f98b2c6ec740 |
| 0.3.0-nullsafety.3 | 2021-02-10T10:21:39.570876Z | Download | 36b02d3b045397742eb38cb7bf8e525502b3fd8507555627eb04cde95220a517 |
| 0.3.1-nullsafety.0 | 2021-02-11T11:59:16.508129Z | Download | 964278d1086822a3cc5dbf0b1d8811f3295ff679d5c76e2e763f4ab59c596c09 |
| 1.0.0 | 2021-02-11T18:01:26.097776Z | Download | d97fffd9d86f3dccc7a9059128b468a99320c69007cc9d41a3a1bda07d4e86dc |
| 1.1.0 | 2021-05-25T14:58:09.310431Z | Download | 4842f817e11428513b7e88537318e48caac7d1bbf6035cdfca64b5017a6d5d8c |
| 1.1.1 | 2021-05-27T12:30:23.329384Z | Download | 2147e33e073790090f267d42cd2ae15673769d48a6792d6c6730e4103b461984 |
| 1.1.2 | 2021-06-04T07:55:24.715216Z | Download | 35d0f481d939de0d640b3db9a7aa36a52cd22054a798a73b4f50bdad5ce12678 |
| 1.2.0-dev.0 | 2022-01-20T15:11:31.996350Z | Download | 9e7659c9b55708286edc808b6e9b29c9fddc5708cf7bab61d485aba284af0d85 |
| 1.2.0 | 2022-02-03T15:35:26.894352Z | Download | 1e4cc72e737ddc0592a4959404a2ecb7220bfc633e9cfe378d4d0b301088dca1 |
| 1.2.1 | 2022-05-13T09:34:04.545392Z | Download | 13a6ccf6a459a125b3fcdb6ec73bd5ff90822e071207c663bfd1f70062d51d18 |
| 2.0.0 | 2022-05-27T18:13:36.555815Z | Download | 0396b3798d91e7330911407d0cebc6bcb776aff56da567deb1ef3f40a469e72a |
| 2.0.1 | 2022-06-19T17:34:01.459075Z | Download | a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 |
| 2.0.2 | 2023-05-09T16:09:21.643379Z | Download | ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 |
| 2.1.0 | 2023-08-08T11:22:54.714532Z | Download | 7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878 |
| 2.1.1 | 2024-01-15T18:58:59.493949Z | Download | ed4a87c136a4fa7966b09c685c255ecfcb29828d59851a5897d07974393783de |
| 2.1.2 | 2024-01-17T09:01:55.236506Z | Download | 493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21 |
| 2.1.3 | 2024-08-12T10:07:11.582499Z | Download | 16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6 |
| 2.1.4 | 2025-02-17T10:20:44.331442Z | Download | 289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418 |
| 2.1.5 | 2026-01-07T08:29:53.361531Z | Download | d07d37192dbf97461359c1518788f203b0c9102cfd2c35a716b823741219542c |
| 2.2.0 | 2026-02-11T14:08:51.217392Z | Download | 6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45 |
Dependencies
No direct dependencies declared.