-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathperry.config.ts
More file actions
88 lines (81 loc) · 2.44 KB
/
perry.config.ts
File metadata and controls
88 lines (81 loc) · 2.44 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
* Perry compiler configuration for hone-editor.
*
* Perry compiles TypeScript to native binaries for all 6 platforms.
* Each platform links against its corresponding Rust FFI crate for
* native text rendering.
*
* Build commands:
* perry compile src/index.ts --target macos --bundle-ffi native/macos/
* perry compile src/index.ts --target windows --bundle-ffi native/windows/
* perry compile src/index.ts --target linux --bundle-ffi native/linux/
* perry compile src/index.ts --target ios --bundle-ffi native/ios/
* perry compile src/index.ts --target android --bundle-ffi native/android/
* perry compile src/index.ts --target web --bundle-ffi native/web/
*/
export default {
/** Package name for Perry registry. */
name: '@honeide/editor',
/** Package version. */
version: '0.2.0',
/** Entry point. */
entry: 'core/index.ts',
/** Perry compiler version pin. */
perry: '0.2.162',
/** Build targets with platform-specific FFI crate paths. */
targets: {
macos: {
ffi: 'native/macos/',
arch: ['arm64', 'x86_64'],
minOs: '13.0',
frameworks: ['CoreText', 'CoreGraphics', 'CoreFoundation', 'Metal', 'QuartzCore'],
},
ios: {
ffi: 'native/ios/',
arch: ['arm64'],
minOs: '16.0',
frameworks: ['CoreText', 'CoreGraphics', 'CoreFoundation', 'UIKit'],
},
windows: {
ffi: 'native/windows/',
arch: ['x86_64', 'aarch64'],
minOs: '10.0.17763', // Windows 10 1809+
libs: ['dwrite', 'd2d1', 'dcomp'],
},
linux: {
ffi: 'native/linux/',
arch: ['x86_64', 'aarch64'],
pkgConfig: ['gtk4', 'pango', 'pangocairo', 'cairo'],
},
android: {
ffi: 'native/android/',
arch: ['arm64-v8a', 'armeabi-v7a', 'x86_64'],
minSdk: 26,
ndk: '26.1.10909125',
},
web: {
ffi: 'native/web/',
wasmTarget: 'wasm32-unknown-unknown',
wasmBindgen: true,
optimizeSize: true,
},
},
/** Shared compiler options. */
compiler: {
/** Strip debug info in release builds. */
stripDebug: true,
/** Enable link-time optimization for Rust crates. */
lto: true,
/** Rust edition for all FFI crates. */
rustEdition: '2021',
},
/** Development settings. */
dev: {
/** Default development target. */
defaultTarget: 'macos',
/** Hot reload on file save. */
hotReload: true,
/** Verbose FFI logging in debug builds. */
ffiDebugLog: false,
},
};