forked from dart-lang/native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathffigen.dart
More file actions
29 lines (25 loc) · 939 Bytes
/
ffigen.dart
File metadata and controls
29 lines (25 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
import 'package:ffigen/ffigen.dart';
void main() {
final packageRoot = Platform.script.resolve('../');
FfiGenerator(
headers: Headers(
entryPoints: [packageRoot.resolve('third_party/sqlite/sqlite3.h')],
),
functions: Functions.includeSet({'sqlite3_libversion'}),
output: Output(
dartFile: packageRoot.resolve('lib/src/third_party/sqlite3.g.dart'),
preamble: '''
// The author disclaims copyright to this source code. In place of
// a legal notice, here is a blessing:
//
// May you do good and not evil.
// May you find forgiveness for yourself and forgive others.
// May you share freely, never taking more than you give.
''',
),
).generate();
}