Skip to content

Commit 53856e7

Browse files
authored
Use package:ffigen (#17)
1 parent bbdf034 commit 53856e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5726
-3093
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.5.1
2+
* Uses `package:ffigen` to generate the Dart bindings.
3+
* Bumped SDK constraint to Dart 2.12.
4+
15
# 0.5.0
26
* Rolled forward all dependencies to Dart 2.12 previews.
37
* Migrated breaking changes for [package:ffi](https://pub.dev/packages/ffi) version `1.0.0`.

example/pubspec.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ packages:
436436
path: ".."
437437
relative: true
438438
source: path
439-
version: "0.5.0"
439+
version: "0.5.1"
440440
webdriver:
441441
dependency: transitive
442442
description:
@@ -459,5 +459,5 @@ packages:
459459
source: hosted
460460
version: "2.2.1"
461461
sdks:
462-
dart: ">=2.12.0-259.9.beta <3.0.0"
463-
flutter: ">=1.24.0-10.2.pre"
462+
dart: ">=2.12.0 <3.0.0"
463+
flutter: ">=2.0.0"

example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ description: Demonstrates how to use the webcrypto plugin.
2020
publish_to: "none" # Remove this line if you wish to publish to pub.dev
2121

2222
environment:
23-
sdk: ">=2.12.0-259.9.beta <3.0.0"
24-
flutter: ">=1.17.0"
23+
sdk: ">=2.12.0 <3.0.0"
24+
flutter: '>=2.0.0'
2525

2626
dependencies:
2727
flutter:

lib/src/boringssl/aead.dart

Lines changed: 0 additions & 241 deletions
This file was deleted.

lib/src/boringssl/aes.dart

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: WebCryptoDartDL
2+
description: 'Bindings to src/webcrypto_dart_dl.h.'
3+
output: 'lib/src/boringssl/bindings/generated_bindings.dart'
4+
headers:
5+
entry-points:
6+
- src/webcrypto_dart_dl.h
7+
- src/webcrypto.c
8+
compiler-opts: '-Ithird_party/dart-sdk/src/runtime/ -Ithird_party/boringssl/src/include'
9+
comments:
10+
style: any
11+
length: full
12+
sort: true
13+
typedef-map:
14+
# TODO(dacoharkes): https://github.com/dart-lang/sdk/issues/42563 https://github.com/dart-lang/ffigen/issues/7
15+
size_t: IntPtr
16+
macros:
17+
include:
18+
- nothing
19+
enums:
20+
include:
21+
- nothing
22+
unnamed-enums:
23+
include:
24+
- nothing
25+
globals:
26+
include:
27+
- nothing
28+
structs:
29+
include:
30+
- nothing
31+
dependency-only: opaque
32+
functions:
33+
include:
34+
# Keep consistent with src/symbols.yaml.
35+
- webcrypto_dart_dl_attach_finalizer
36+
- webcrypto_dart_dl_initialize
37+
- webcrypto_lookup_symbol
38+
preamble: |
39+
// Copyright 2021 Google LLC
40+
//
41+
// Licensed under the Apache License, Version 2.0 (the "License");
42+
// you may not use this file except in compliance with the License.
43+
// You may obtain a copy of the License at
44+
//
45+
// http://www.apache.org/licenses/LICENSE-2.0
46+
//
47+
// Unless required by applicable law or agreed to in writing, software
48+
// distributed under the License is distributed on an "AS IS" BASIS,
49+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
50+
// See the License for the specific language governing permissions and
51+
// limitations under the License.
52+
//
53+
// ignore_for_file: unused_element
54+

0 commit comments

Comments
 (0)