[package]
name = "cranpose"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"
description = "Build desktop, mobile and web apps with composable Rust functions"
autotests = false
[package.metadata.docs.rs]
features = ["desktop", "renderer-wgpu"]
rustdoc-args = ["--cfg", "docsrs"]
[lints]
workspace = true
[package.metadata.cargo-machete]
ignored = ["cranpose-render-pixels"]
[features]
localized-arabic = ["dep:cranpose-fonts", "cranpose-fonts/arabic"]
localized-devanagari = ["dep:cranpose-fonts", "cranpose-fonts/devanagari"]
localized-cjk = ["dep:cranpose-fonts", "cranpose-fonts/cjk"]
localization = ["cranpose-ui/localization", "cranpose-liquid/localization", "cranpose-services/localization", "dep:sys-locale", "text-shaping"]
localization-formatting = ["localization", "cranpose-ui/localization-formatting"]
text-shaping = ["cranpose-render-common/text-shaping"]
default = ["embedded-default-font"]
release-log-info = ["log/release_max_level_info"]
embedded-default-font = ["cranpose-render-common/embedded-default-font"]
renderer-wgpu-gles = [
"renderer-wgpu",
"cranpose-render-wgpu/backend-gles",
]
desktop = ["desktop-x11", "desktop-wayland"]
desktop-x11 = [
"desktop-shell",
"cranpose-platform-desktop-winit/x11",
"winit/x11",
"dep:x11rb",
]
desktop-wayland = [
"desktop-shell",
"cranpose-platform-desktop-winit/wayland",
"winit/wayland",
"winit/wayland-dlopen",
"winit/wayland-csd-adwaita",
]
desktop-shell = [
"native-windows",
"cranpose-app-shell/clipboard-native",
"dep:objc2",
"dep:objc2-app-kit",
"dep:windows-sys",
"cranpose-platform-desktop-winit",
"dep:winit",
"dep:accesskit",
"cranpose-services/uri-native",
"cranpose-services/file-picker-native",
"cranpose-services/system-theme",
"cranpose-services/notifier-native",
]
embed = [
"dep:serde",
"dep:serde_json",
"renderer-wgpu",
"native-windows",
"cranpose-app-shell/clipboard-native",
"cranpose-services/uri-native",
]
native-windows = []
ios = [
"dep:cranpose-media",
"cranpose-platform-desktop-winit",
"dep:winit",
"dep:objc2",
"dep:objc2-foundation",
"dep:objc2-ui-kit",
"dep:objc2-uniform-type-identifiers",
"dep:objc2-user-notifications",
"dep:block2",
"dep:dispatch2",
"dep:objc2-av-foundation",
"dep:objc2-core-media",
"dep:objc2-core-video",
"dep:objc2-core-foundation",
"dep:objc2-avf-audio",
"dep:objc2-media-player",
"dep:oslog",
]
android = [
"cranpose-platform-android",
"cranpose-render-wgpu?/backend-gles",
"cranpose-services/uri-android",
]
web = [
"cranpose-platform-web",
"dep:wasm-bindgen",
"dep:web-sys",
"dep:js-sys",
"cranpose-services/uri-web",
"cranpose-services/file-picker-web",
"cranpose-services/system-theme-web",
"cranpose-services/preferences-web",
]
audio = ["dep:cranpose-audio", "cranpose-audio/aaudio"]
audio-desktop = ["audio", "cranpose-audio/cpal-backend"]
camera-desktop = [
"dep:objc2",
"dep:block2",
"dep:dispatch2",
"dep:objc2-av-foundation",
"dep:objc2-core-media",
"dep:objc2-core-video",
]
media = ["dep:cranpose-media"]
renderer-pixels = ["cranpose-render-pixels"]
watchos = [
"renderer-pixels",
"dep:objc2",
"dep:objc2-foundation",
"dep:block2",
"dep:dispatch2",
"dep:objc2-avf-audio",
"dep:objc2-watch-kit",
"dep:oslog",
]
renderer-wgpu = ["cranpose-render-wgpu", "dep:wgpu", "dep:pollster", "dep:ash"]
robot = ["cranpose-app-shell/test-support"]
storekit = ["dep:cranpose-storekit"]
wearable = [
"dep:objc2",
"dep:objc2-foundation",
"dep:block2",
"dep:dispatch2",
"dep:objc2-watch-connectivity",
]
playbilling = []
preview = ["embed", "dep:inventory", "cranpose-ui/inspection"]
hot-reload = ["cranpose-core/hot-reload", "cranpose-macros/hot-reload"]
webview = ["dep:wry", "dep:gtk"]
[dependencies]
cranpose-app-shell = { workspace = true }
cranpose-fonts = { workspace = true, optional = true }
cranpose-audio = { workspace = true, optional = true }
cranpose-core = { workspace = true }
cranpose-foundation = { workspace = true }
cranpose-media = { workspace = true, optional = true }
cranpose-ui = { workspace = true }
cranpose-ui-layout = { workspace = true }
cranpose-platform-desktop-winit = { workspace = true, optional = true }
cranpose-platform-android = { workspace = true, optional = true }
cranpose-platform-web = { workspace = true, optional = true }
cranpose-render-pixels = { workspace = true, optional = true }
cranpose-render-wgpu = { workspace = true, optional = true }
pollster = { version = "0.4.0", optional = true }
winit = { version = "=0.31.0-beta.3", optional = true, default-features = false }
wasm-bindgen = { version = "0.2", optional = true }
web-sys = { version = "0.3", optional = true, features = [
"Window",
"Location",
"Document",
"Element",
"HtmlElement",
"HtmlCanvasElement",
"HtmlIFrameElement",
"DomRect",
"CanvasRenderingContext2d",
"ImageData",
"Performance",
"MouseEvent",
"EventTarget",
"Touch",
"TouchList",
"TouchEvent",
"PointerEvent",
"WheelEvent",
"KeyboardEvent",
"CssStyleDeclaration",
"Navigator",
"Clipboard",
"ClipboardEvent",
"DataTransfer",
"DragEvent",
"FileList",
"BatteryManager",
"CompositionEvent",
"HtmlInputElement",
"HtmlTextAreaElement",
"Node",
"MediaQueryList",
"MediaQueryListEvent",
"ShareData",
"File",
"FilePropertyBag",
"Notification",
"NotificationOptions",
"NotificationPermission",
"HtmlMediaElement",
"HtmlAudioElement",
"TimeRanges",
"Blob",
"BlobPropertyBag",
"Url",
"BaseAudioContext",
"AudioContext",
"AudioNode",
"AudioDestinationNode",
"AnalyserNode",
"MediaElementAudioSourceNode",
"AudioParam",
"GainNode",
"ChannelSplitterNode",
"ChannelMergerNode",
"ChannelCountMode",
"BiquadFilterNode",
"BiquadFilterType",
] }
js-sys = { version = "0.3", optional = true }
log = "0.4"
cranpose-capabilities = { workspace = true }
cranpose-liquid = { workspace = true }
cranpose-services = { workspace = true, default-features = false }
cranpose-storekit = { workspace = true, default-features = false, optional = true }
thiserror = "2.0.21"
web-time = { workspace = true }
cranpose-render-common.workspace = true
raw-window-handle = "0.6"
accesskit = { version = "0.25.1", optional = true }
serde = { version = "1.0.229", features = ["derive"], optional = true }
serde_json = { version = "1.0.151", optional = true }
inventory = { version = "0.3.24", optional = true }
cranpose-macros = { workspace = true }
sys-locale = { version = "0.3.2", features = ["js"], optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
cranpose-ui-graphics = { workspace = true }
wasm-bindgen-futures = "0.4"
wgpu = { workspace = true, optional = true, features = [
"std",
"webgpu",
"webgl",
"wgsl",
] }
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[target.'cfg(target_os = "android")'.dependencies]
android-activity = { workspace = true }
ash = { version = "0.38", optional = true }
android_logger = "0.15"
jni = "0.22.4"
ndk = "0.9.0"
ndk-sys = "0.6.0"
raw-window-handle = "0.6"
zune-core = "0.5.3"
zune-jpeg = "0.5.15"
wgpu = { workspace = true, optional = true, features = [
"std",
"parking_lot",
"vulkan",
] }
[target.'cfg(all(target_os = "linux", not(target_arch = "wasm32")))'.dependencies]
accesskit_unix = { version = "0.24.0", default-features = false, features = ["async-io"] }
x11rb = { version = "0.13.2", optional = true }
wgpu = { workspace = true, optional = true, features = [
"std",
"parking_lot",
"vulkan",
] }
[target.'cfg(target_os = "windows")'.dependencies]
accesskit_windows = "0.35.1"
windows-sys = { version = "0.61", optional = true, features = ["Win32_System_Registry"] }
wgpu = { workspace = true, optional = true, features = [
"std",
"parking_lot",
"dx12",
] }
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
mach2 = "0.6.0"
[target.'cfg(target_os = "macos")'.dependencies]
accesskit_macos = "0.27.1"
objc2-foundation = { version = "0.3", default-features = false, features = [
"std",
"NSArray",
"NSDictionary",
"NSEnumerator",
"NSError",
"NSObject",
"NSGeometry",
"NSProcessInfo",
"NSString",
"NSUserDefaults",
"NSValue",
] }
objc2-app-kit = { version = "0.3", default-features = false, optional = true, features = [
"std",
"NSBitmapImageRep",
"NSCursor",
"NSGraphics",
"NSImage",
"NSImageRep",
"NSResponder",
"NSView",
"NSWindow",
] }
objc2 = { version = "0.6", optional = true }
block2 = { version = "0.6", optional = true }
dispatch2 = { version = "0.3", optional = true }
objc2-av-foundation = { version = "0.3", default-features = false, optional = true, features = [
"dispatch2",
"std",
"block2",
"objc2-core-media",
"AVCaptureSession",
"AVCaptureSessionPreset",
"AVCaptureDevice",
"AVCaptureInput",
"AVCaptureOutput",
"AVCaptureOutputBase",
"AVCaptureVideoDataOutput",
"AVCapturePhotoOutput",
"AVMediaFormat",
"AVVideoSettings",
] }
objc2-core-media = { version = "0.3", default-features = false, optional = true, features = [
"std",
"objc2-core-video",
"CMSampleBuffer",
] }
objc2-core-video = { version = "0.3", default-features = false, optional = true, features = [
"std",
"CVBase",
"CVPixelBuffer",
"CVImageBuffer",
"CVBuffer",
"CVReturn",
] }
wgpu = { workspace = true, optional = true, features = [
"std",
"parking_lot",
"metal",
] }
[target.'cfg(target_os = "ios")'.dependencies]
wgpu = { workspace = true, optional = true, features = [
"std",
"parking_lot",
"metal",
] }
objc2 = { version = "0.6", optional = true }
objc2-foundation = { version = "0.3", default-features = false, optional = true, features = [
"std",
"NSArray",
"NSData",
"NSDictionary",
"NSEnumerator",
"NSError",
"NSNotification",
"NSObject",
"NSBundle",
"NSPathUtilities",
"NSProcessInfo",
"NSSet",
"NSString",
"NSURL",
"NSValue",
] }
objc2-ui-kit = { version = "0.3", default-features = false, optional = true, features = [
"std",
"block2",
"objc2-core-foundation",
"objc2-uniform-type-identifiers",
"UIGeometry",
"UIScreen",
"UIActivity",
"UIActivityViewController",
"UIAccessibility",
"UIAccessibilityAdditions",
"UIAccessibilityConstants",
"UIAccessibilityContainer",
"UIAccessibilityCustomAction",
"UIAccessibilityElement",
"UIAccessibilityIdentification",
"UIApplication",
"UIContentSizeCategory",
"UIControl",
"UIDevice",
"UIDocumentPickerViewController",
"UIFeedbackGenerator",
"UIImage",
"UIImagePickerController",
"UIImpactFeedbackGenerator",
"UINavigationController",
"UINotificationFeedbackGenerator",
"NSText",
"UIPasteboard",
"UIPopoverPresentationController",
"UIPresentationController",
"UIResponder",
"UIGestureRecognizerSubclass",
"UIScreenEdgePanGestureRecognizer",
"UIGestureRecognizer",
"UIPanGestureRecognizer",
"UIScene",
"UISceneOptions",
"UISceneSession",
"UISelectionFeedbackGenerator",
"UITextField",
"UITextInput",
"UITextInput",
"UITextInputTraits",
"UIKeyboardLayoutGuide",
"UILayoutGuide",
"UITrackingLayoutGuide",
"UIView",
"UIViewController",
"UIWindow",
"UIWindowScene",
] }
objc2-uniform-type-identifiers = { version = "0.3", default-features = false, optional = true, features = [
"std",
"UTCoreTypes",
"UTType",
] }
block2 = { version = "0.6", optional = true }
dispatch2 = { version = "0.3", optional = true }
objc2-core-foundation = { version = "0.3", default-features = false, optional = true, features = ["std", "CFCGTypes"] }
objc2-av-foundation = { version = "0.3", default-features = false, optional = true, features = [
"dispatch2",
"std",
"block2",
"objc2-core-media",
"AVCaptureSession",
"AVCaptureSessionPreset",
"AVCaptureDevice",
"AVCaptureInput",
"AVCaptureOutput",
"AVCaptureOutputBase",
"AVCaptureVideoDataOutput",
"AVCapturePhotoOutput",
"AVMediaFormat",
"AVVideoSettings",
"AVAsset",
"AVPlayer",
"AVPlayerItem",
] }
objc2-core-media = { version = "0.3", default-features = false, optional = true, features = [
"std",
"objc2-core-video",
"CMSampleBuffer",
"CMTime",
] }
objc2-core-video = { version = "0.3", default-features = false, optional = true, features = [
"std",
"CVBase",
"CVPixelBuffer",
"CVImageBuffer",
"CVBuffer",
"CVReturn",
] }
objc2-user-notifications = { version = "0.3", default-features = false, optional = true, features = [
"std",
"block2",
"UNUserNotificationCenter",
"UNNotification",
"UNNotificationRequest",
"UNNotificationContent",
"UNNotificationResponse",
"UNNotificationSound",
"UNNotificationTrigger",
"UNError",
] }
objc2-avf-audio = { version = "0.3.2", default-features = false, optional = true, features = [
"std",
"block2",
"AVAudioSession",
"AVAudioSessionRoute",
"AVAudioSessionTypes",
] }
oslog = { version = "0.2", default-features = false, optional = true }
objc2-watch-connectivity = { version = "0.3.2", default-features = false, optional = true, features = [
"std",
"block2",
"WCSession",
] }
objc2-media-player = { version = "0.3.2", default-features = false, optional = true, features = [
"std",
"block2",
"MPMediaItem",
"MPNowPlayingInfoCenter",
"MPRemoteCommand",
"MPRemoteCommandCenter",
"MPRemoteCommandEvent",
] }
[target.'cfg(target_os = "watchos")'.dependencies]
objc2 = { version = "0.6", optional = true }
objc2-foundation = { version = "0.3", default-features = false, optional = true, features = [
"std",
"block2",
"NSBundle",
"NSData",
"NSError",
"NSObject",
"NSPathUtilities",
"NSString",
] }
block2 = { version = "0.6", optional = true }
dispatch2 = { version = "0.3", optional = true }
objc2-avf-audio = { version = "0.3.2", default-features = false, optional = true, features = [
"std",
"block2",
"AVAudioSession",
"AVAudioSessionTypes",
] }
objc2-watch-connectivity = { version = "0.3.2", default-features = false, optional = true, features = [
"std",
"block2",
"WCSession",
] }
oslog = { version = "0.2", default-features = false, optional = true }
objc2-watch-kit = { version = "0.3.2", default-features = false, optional = true, features = [
"std",
"WKInterfaceDevice",
] }
[target.'cfg(all(not(target_arch = "wasm32"), not(target_os = "android"), not(target_os = "linux"), not(target_os = "windows"), not(target_os = "macos"), not(target_os = "ios")))'.dependencies]
wgpu = { workspace = true, optional = true, features = [
"std",
"parking_lot",
"vulkan",
] }
[target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "linux", target_os = "ios"))'.dependencies]
wry = { version = "0.57", default-features = false, features = ["os-webview", "x11"], optional = true }
[target.'cfg(target_os = "linux")'.dependencies]
gtk = { version = "0.18.2", optional = true }
[dev-dependencies]
cranpose-core = { path = "../cranpose-core", features = ["test-helpers"] }
cranpose-runtime-std = { path = "../cranpose-runtime-std" }
[[test]]
name = "integration"
path = "tests/integration.rs"
[[example]]
name = "localization"
path = "examples/localization.rs"
required-features = ["desktop", "renderer-wgpu", "localization"]