Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Add ffigen yaml schema (#586)
Browse files Browse the repository at this point in the history
  • Loading branch information
mannprerak2 authored Jul 12, 2023
1 parent 271b576 commit d46d4fd
Show file tree
Hide file tree
Showing 22 changed files with 2,246 additions and 1,124 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 9.0.0

- Added a JSON schema for FFIgen config files.

# 8.0.2

- Fixed invalid code generated due to zero-length arrays in structs/union.
Expand Down
2 changes: 2 additions & 0 deletions example/c_json/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=../../ffigen.schema.json

output: 'cjson_generated_bindings.dart'
name: 'CJson'
description: 'Holds bindings to cJSON.'
Expand Down
4 changes: 3 additions & 1 deletion example/ffinative/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=../../ffigen.schema.json

name: NativeLibrary
ffi-native:
# asset: 'assetname' # (optional)
Expand All @@ -7,4 +9,4 @@ headers:
entry-points:
- 'headers/example.h'
preamble: |
// ignore_for_file: deprecated_member_use
// ignore_for_file: deprecated_member_use
2 changes: 2 additions & 0 deletions example/libclang-example/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=../../ffigen.schema.json

output: 'generated_bindings.dart'

# This will sort the bindings alphabetically.
Expand Down
2 changes: 2 additions & 0 deletions example/objective_c/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=../../ffigen.schema.json

name: AVFAudio
description: Bindings for AVFAudio.
language: objc
Expand Down
2 changes: 2 additions & 0 deletions example/shared_bindings/ffigen_configs/a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# 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.

# yaml-language-server: $schema=../../../ffigen.schema.json

name: NativeLibraryA
description: Bindings to `headers/a.h`.
output: '../lib/generated/a_gen.dart'
Expand Down
2 changes: 2 additions & 0 deletions example/shared_bindings/ffigen_configs/a_shared_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# 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.

# yaml-language-server: $schema=../../../ffigen.schema.json

name: NativeLibraryASharedB
description: Bindings to `headers/a.h` with shared definitions from `headers/base.h`.
output: '../lib/generated/a_shared_b_gen.dart'
Expand Down
2 changes: 2 additions & 0 deletions example/shared_bindings/ffigen_configs/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# 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.

# yaml-language-server: $schema=../../../ffigen.schema.json

name: NativeLibraryBase
description: Bindings to `headers/base.h`.
output:
Expand Down
2 changes: 2 additions & 0 deletions example/simple/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=../../ffigen.schema.json

name: NativeLibrary
description: Bindings to `headers/example.h`.
output: 'generated_bindings.dart'
Expand Down
2 changes: 2 additions & 0 deletions example/swift/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=../../ffigen.schema.json

name: SwiftLibrary
description: Bindings for swift_api.
language: objc
Expand Down
Loading

0 comments on commit d46d4fd

Please sign in to comment.