Skip to content

Commit b3ef490

Browse files
committed
Add iBeacon example plugin package
1 parent d43573e commit b3ef490

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// swift-tools-version: 6.2
2+
// Example BluetoothExplorer parser plugin, written in Embedded Swift and compiled to wasm32.
3+
//
4+
// swift build -c release --swift-sdk swift-6.3.3-RELEASE_wasm-embedded --product IBeacon
5+
//
6+
import PackageDescription
7+
8+
let package = Package(
9+
name: "IBeacon",
10+
products: [
11+
.executable(name: "IBeacon", targets: ["IBeacon"])
12+
],
13+
dependencies: [
14+
.package(path: "../../BLEPluginSDK")
15+
],
16+
targets: [
17+
.executableTarget(
18+
name: "IBeacon",
19+
dependencies: [
20+
.product(name: "BLEPluginSDK", package: "BLEPluginSDK")
21+
],
22+
swiftSettings: [
23+
.enableExperimentalFeature("Embedded"),
24+
.enableExperimentalFeature("Extern"),
25+
.unsafeFlags(["-wmo"])
26+
],
27+
linkerSettings: [
28+
// Reactor model: no main(); the host calls _initialize then the exports.
29+
.unsafeFlags(["-Xclang-linker", "-mexec-model=reactor"])
30+
]
31+
)
32+
]
33+
)

0 commit comments

Comments
 (0)