eleven / ocho Public

Clone
git clone https://amadan.net/eleven/ocho

Plain git — no account needed to clone.

Download

Download this file

1// swift-tools-version: 5.9
2import PackageDescription
3
4// The platform-neutral core shared by the iOS app, the native Mac app, and the
5// notification extension: crypto (the native twin of web/static/crypto.js),
6// models, the REST client, and the thread-list store. No UIKit/AppKit imports —
7// anything platform-specific stays in the app targets. See docs/native-chat.md.
8let package = Package(
9 name: "LChatCore",
10 platforms: [.iOS(.v17), .macOS(.v14)],
11 products: [
12 .library(name: "LChatCore", targets: ["LChatCore"])
13 ],
14 dependencies: [
15 .package(url: "https://amadan.net/rastrillo/native", revision: "e6520f10a71d60220cddc706d533b550dcede3a7"),
16 // The native half of the twin-parsed CommonMark subset (#531):
17 // cmark-gfm via swift-markdown, walked with the same allowlist as
18 // web/static/markdown.js and held to the same vectors
19 // (Fixtures/markdown-vector.json). Exact pin — like Sparkle in
20 // project.yml — so the twins only ever bump deliberately.
21 .package(url: "https://github.com/swiftlang/swift-markdown.git", exact: "0.8.0")
22 ],
23 targets: [
24 // Flows/ carries the conversation scripts (byte-derived copies of
25 // web/static/apps/*.flow.js, drift-gated by test/flow.test.mjs).
26 // Schemas/ carries the app-schema JSON (byte-identical copies of the
27 // canonical web/static/apps/schemas/, drift-gated by
28 // test/schema-engine.test.mjs).
29 .target(
30 name: "LChatCore",
31 dependencies: [
32 .product(name: "Markdown", package: "swift-markdown"),
33 .product(name: "RastrilloNative", package: "native"),
34 ],
35 resources: [.copy("Flows"), .copy("Icons"), .copy("Schemas"), .copy("Marks"), .copy("Seed")]
36 ),
37 // The cross-implementation drift gates (fixtures generated by the web
38 // crypto — see test/threadkey.test.mjs). `swift test` runs them natively
39 // on the Mac, no simulator needed.
40 .testTarget(
41 name: "LChatCoreTests",
42 dependencies: ["LChatCore"],
43 resources: [.copy("Fixtures")]
44 ),
45 ]
46)
47