1 | [package] |
2 | name = "softbuffer" |
3 | version = "0.4.6" |
4 | edition = "2021" |
5 | license = "MIT OR Apache-2.0" |
6 | description = "Cross-platform software buffer" |
7 | documentation = "https://docs.rs/softbuffer" |
8 | readme = "README.md" |
9 | repository = "https://github.com/rust-windowing/softbuffer" |
10 | keywords = ["framebuffer" , "windowing" ] |
11 | categories = ["game-development" , "graphics" , "gui" , "multimedia" , "rendering" ] |
12 | exclude = ["examples" ] |
13 | rust-version = "1.70.0" |
14 | |
15 | [[bench]] |
16 | name = "buffer_mut" |
17 | harness = false |
18 | |
19 | [features] |
20 | default = ["kms" , "x11" , "x11-dlopen" , "wayland" , "wayland-dlopen" ] |
21 | kms = ["bytemuck" , "drm" , "rustix" ] |
22 | wayland = ["wayland-backend" , "wayland-client" , "wayland-sys" , "memmap2" , "rustix" , "fastrand" ] |
23 | wayland-dlopen = ["wayland-sys/dlopen" ] |
24 | x11 = ["as-raw-xcb-connection" , "bytemuck" , "fastrand" , "rustix" , "tiny-xlib" , "x11rb" ] |
25 | x11-dlopen = ["tiny-xlib/dlopen" , "x11rb/dl-libxcb" ] |
26 | |
27 | [dependencies] |
28 | log = "0.4.17" |
29 | raw_window_handle = { package = "raw-window-handle" , version = "0.6" , features = ["std" ] } |
30 | |
31 | [target.'cfg(all(unix, not(any(target_vendor = "apple", target_os = "android", target_os = "redox"))))'.dependencies] |
32 | as-raw-xcb-connection = { version = "1.0.0" , optional = true } |
33 | bytemuck = { version = "1.12.3" , optional = true } |
34 | drm = { version = "0.12.0" , default-features = false, optional = true } |
35 | fastrand = { version = "2.0.0" , optional = true } |
36 | memmap2 = { version = "0.9.0" , optional = true } |
37 | rustix = { version = "0.38.19" , features = ["fs" , "mm" , "shm" , "std" ], default-features = false, optional = true } |
38 | tiny-xlib = { version = "0.2.1" , optional = true } |
39 | wayland-backend = { version = "0.3.0" , features = ["client_system" ], optional = true } |
40 | wayland-client = { version = "0.31.0" , optional = true } |
41 | wayland-sys = { version = "0.31.0" , optional = true } |
42 | x11rb = { version = "0.13.0" , features = ["allow-unsafe-code" , "shm" ], optional = true } |
43 | |
44 | [target.'cfg(target_os = "windows")'.dependencies.windows-sys] |
45 | version = "0.59.0" |
46 | features = ["Win32_Graphics_Gdi" , "Win32_UI_Shell" , "Win32_UI_WindowsAndMessaging" , "Win32_Foundation" ] |
47 | |
48 | [target.'cfg(target_vendor = "apple")'.dependencies] |
49 | bytemuck = { version = "1.12.3" , features = ["extern_crate_alloc" ] } |
50 | core-graphics = "0.24.0" |
51 | foreign-types = "0.5.0" |
52 | objc2 = "0.5.2" |
53 | objc2-foundation = { version = "0.2.2" , features = [ |
54 | "NSDictionary" , |
55 | "NSGeometry" , |
56 | "NSKeyValueObserving" , |
57 | "NSString" , |
58 | "NSThread" , |
59 | "NSValue" , |
60 | ] } |
61 | objc2-quartz-core = { version = "0.2.2" , features = ["CALayer" , "CATransaction" ] } |
62 | |
63 | [target.'cfg(target_arch = "wasm32")'.dependencies] |
64 | js-sys = "0.3.63" |
65 | wasm-bindgen = "0.2.86" |
66 | |
67 | [target.'cfg(target_arch = "wasm32")'.dependencies.web-sys] |
68 | version = "0.3.55" |
69 | features = [ |
70 | "CanvasRenderingContext2d" , |
71 | "Document" , |
72 | "Element" , |
73 | "HtmlCanvasElement" , |
74 | "ImageData" , |
75 | "OffscreenCanvas" , |
76 | "OffscreenCanvasRenderingContext2d" , |
77 | "Window" , |
78 | ] |
79 | |
80 | [target.'cfg(target_os = "redox")'.dependencies] |
81 | redox_syscall = "0.5" |
82 | |
83 | [build-dependencies] |
84 | cfg_aliases = "0.2.0" |
85 | |
86 | [dev-dependencies] |
87 | colorous = "1.0.12" |
88 | criterion = { version = "0.4.0" , default-features = false, features = ["cargo_bench_support" ] } |
89 | web-time = "1.0.0" |
90 | winit = "0.30.0" |
91 | |
92 | [dev-dependencies.image] |
93 | version = "0.25.0" |
94 | # Disable rayon on web |
95 | default-features = false |
96 | features = ["jpeg" ] |
97 | |
98 | [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] |
99 | # Turn rayon back on everywhere else; creating the separate entry resets the features to default. |
100 | rayon = "1.5.1" |
101 | |
102 | [target.'cfg(target_arch = "wasm32")'.dev-dependencies] |
103 | wasm-bindgen-test = "0.3" |
104 | |
105 | [target.'cfg(all(unix, not(any(target_vendor = "apple", target_os = "android", target_os = "redox"))))'.dev-dependencies] |
106 | rustix = { version = "0.38.8" , features = ["event" ] } |
107 | |
108 | [workspace] |
109 | members = [ |
110 | "run-wasm" , |
111 | ] |
112 | |
113 | [package.metadata.docs.rs] |
114 | all-features = true |
115 | rustdoc-args = ["--cfg" , "docsrs" ] |
116 | default-target = "x86_64-unknown-linux-gnu" |
117 | targets = [ |
118 | "x86_64-pc-windows-msvc" , |
119 | "x86_64-apple-darwin" , |
120 | "x86_64-unknown-linux-gnu" , |
121 | "wasm32-unknown-unknown" , |
122 | ] |
123 | |