diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 30a79fcc4..e764f8e1c 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -39,6 +39,26 @@ dependencies { implementation(libs.jogl) implementation(libs.gluegen) + val lwjglVersion = "3.3.6" + val lwjglNatives = when { + System.getProperty("os.name").lowercase().contains("mac") -> { + if (System.getProperty("os.arch").contains("aarch64")) { + "natives-macos-arm64" + } else { + "natives-macos" + } + } + System.getProperty("os.name").lowercase().contains("win") -> "natives-windows" + System.getProperty("os.name").lowercase().contains("linux") -> "natives-linux" + else -> "natives-linux" + } + + implementation(platform("org.lwjgl:lwjgl-bom:$lwjglVersion")) + implementation("org.lwjgl", "lwjgl") + implementation("org.lwjgl", "lwjgl-glfw") + runtimeOnly("org.lwjgl", "lwjgl", classifier = lwjglNatives) + runtimeOnly("org.lwjgl", "lwjgl-glfw", classifier = lwjglNatives) + testImplementation(libs.junit) } diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 4fccd1a53..9f832d29d 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -9981,10 +9981,6 @@ static public void runSketch(final String[] args, } break; - case ARGS_DISABLE_AWT: - disableAWT = true; - break; - case ARGS_WINDOW_COLOR: if (value.charAt(0) == '#' && value.length() == 7) { value = value.substring(1); @@ -10036,6 +10032,10 @@ static public void runSketch(final String[] args, fullScreen = true; break; + case ARGS_DISABLE_AWT: + disableAWT = true; + break; + default: name = args[argIndex]; break label; // because of break, argIndex won't increment again diff --git a/core/src/processing/core/PConstants.java b/core/src/processing/core/PConstants.java index d21a1fa49..d1179984e 100644 --- a/core/src/processing/core/PConstants.java +++ b/core/src/processing/core/PConstants.java @@ -72,6 +72,8 @@ public interface PConstants { // Experimental JavaFX renderer; even better 2D performance String FX2D = "processing.javafx.PGraphicsFX2D"; + String WEBGPU = "processing.webgpu.PGraphicsWebGPU"; + String PDF = "processing.pdf.PGraphicsPDF"; String SVG = "processing.svg.PGraphicsSVG"; String DXF = "processing.dxf.RawDXF"; diff --git a/core/src/processing/webgpu/PGraphicsWebGPU.java b/core/src/processing/webgpu/PGraphicsWebGPU.java index d0ffeef0f..78fb86046 100644 --- a/core/src/processing/webgpu/PGraphicsWebGPU.java +++ b/core/src/processing/webgpu/PGraphicsWebGPU.java @@ -1,4 +1,41 @@ package processing.webgpu; -public class PGraphicsWebGPU { +import processing.core.PGraphics; +import processing.core.PSurface; + +public class PGraphicsWebGPU extends PGraphics { + private long windowId = 0; + + @Override + public PSurface createSurface() { + return surface = new PSurfaceGLFW(this); + } + + protected void initWebGPUSurface(long windowHandle, int width, int height, float scaleFactor) { + windowId = PWebGPU.createSurface(windowHandle, width, height, scaleFactor); + if (windowId == 0) { + System.err.println("Failed to create WebGPU surface"); + } + } + + @Override + public void setSize(int w, int h) { + super.setSize(w, h); + if (windowId != 0) { + PWebGPU.windowResized(windowId, pixelWidth, pixelHeight); + } + } + + @Override + public void endDraw() { + super.endDraw(); + PWebGPU.update(); + } + + @Override + public void dispose() { + super.dispose(); + + PWebGPU.exit(); + } } diff --git a/core/src/processing/webgpu/PSurfaceGLFW.java b/core/src/processing/webgpu/PSurfaceGLFW.java new file mode 100644 index 000000000..49f42230a --- /dev/null +++ b/core/src/processing/webgpu/PSurfaceGLFW.java @@ -0,0 +1,423 @@ +package processing.webgpu; + +import org.lwjgl.glfw.GLFW; +import org.lwjgl.glfw.GLFWErrorCallback; +import org.lwjgl.glfw.GLFWFramebufferSizeCallback; +import org.lwjgl.glfw.GLFWNativeCocoa; +import org.lwjgl.glfw.GLFWWindowPosCallback; +import org.lwjgl.system.MemoryUtil; +import org.lwjgl.system.Platform; + +import processing.core.PApplet; +import processing.core.PGraphics; +import processing.core.PImage; +import processing.core.PSurface; + +import java.io.File; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.locks.Condition; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +/** + * GLFW-based surface implementation for WebGPU. + */ +public class PSurfaceGLFW implements PSurface { + + protected PApplet sketch; + protected PGraphics graphics; + + protected long window; + protected boolean running = false; + + protected boolean paused; + private final Lock pauseLock = new ReentrantLock(); + private final Condition pauseCondition = pauseLock.newCondition(); + + protected float frameRateTarget = 60; + protected long frameRatePeriod = 1000000000L / 60L; + + private static final AtomicInteger windowCount = new AtomicInteger(0); + private static AtomicBoolean glfwInitialized = new AtomicBoolean(false); + + private GLFWFramebufferSizeCallback framebufferSizeCallback; + private GLFWWindowPosCallback windowPosCallback; + + public PSurfaceGLFW(PGraphics graphics) { + this.graphics = graphics; + } + + @Override + public void initOffscreen(PApplet sketch) { + throw new IllegalStateException("PSurfaceGLFW does not support offscreen rendering"); + } + + @Override + public void initFrame(PApplet sketch) { + this.sketch = sketch; + + if (glfwInitialized.compareAndSet(false, true)) { + GLFWErrorCallback.createPrint(System.err).set(); + if (!GLFW.glfwInit()) { + glfwInitialized.set(false); + throw new IllegalStateException("Failed to initialize GLFW"); + } + System.out.println("PSurfaceGLFW: GLFW initialized successfully"); + } + + GLFW.glfwDefaultWindowHints(); + GLFW.glfwWindowHint(GLFW.GLFW_CLIENT_API, GLFW.GLFW_NO_API); // no opengl + GLFW.glfwWindowHint(GLFW.GLFW_VISIBLE, GLFW.GLFW_FALSE); + GLFW.glfwWindowHint(GLFW.GLFW_RESIZABLE, GLFW.GLFW_FALSE); + + window = GLFW.glfwCreateWindow(sketch.sketchWidth(), sketch.sketchHeight(), "Processing", + MemoryUtil.NULL, MemoryUtil.NULL); + if (window == MemoryUtil.NULL) { + throw new RuntimeException("Failed to create GLFW window"); + } + + windowCount.incrementAndGet(); + + // event callbacks + initListeners(); + + if (graphics instanceof PGraphicsWebGPU webgpu) { + PWebGPU.init(); + + long windowHandle = getWindowHandle(); + int width = sketch.sketchWidth(); + int height = sketch.sketchHeight(); + float scaleFactor = sketch.sketchPixelDensity(); + + webgpu.initWebGPUSurface(windowHandle, width, height, scaleFactor); + } + } + + protected void initListeners() { + framebufferSizeCallback = GLFW.glfwSetFramebufferSizeCallback(window, + (window, width, height) -> { + if (sketch != null) { + sketch.postWindowResized(width, height); + } + }); + + windowPosCallback = GLFW.glfwSetWindowPosCallback(window, + (window, xpos, ypos) -> { + if (sketch != null) { + sketch.postWindowMoved(xpos, ypos); + } + }); + + // TODO: all the callbacks + } + + @Override + public Object getNative() { + return window; + } + + public long getWindowHandle() { + if (Platform.get() == Platform.MACOSX) { + return GLFWNativeCocoa.glfwGetCocoaWindow(window); + } else { + throw new UnsupportedOperationException("Window handle retrieval not implemented for this platform"); + } + } + + @Override + public void setTitle(String title) { + if (window != MemoryUtil.NULL) { + GLFW.glfwSetWindowTitle(window, title); + } + } + + @Override + public void setVisible(boolean visible) { + if (window != MemoryUtil.NULL) { + if (visible) { + GLFW.glfwShowWindow(window); + } else { + GLFW.glfwHideWindow(window); + } + } + } + + @Override + public void setResizable(boolean resizable) { + if (window != MemoryUtil.NULL) { + GLFW.glfwSetWindowAttrib(window, GLFW.GLFW_RESIZABLE, + resizable ? GLFW.GLFW_TRUE : GLFW.GLFW_FALSE); + } + } + + @Override + public void setAlwaysOnTop(boolean always) { + if (window != MemoryUtil.NULL) { + GLFW.glfwSetWindowAttrib(window, GLFW.GLFW_FLOATING, + always ? GLFW.GLFW_TRUE : GLFW.GLFW_FALSE); + } + } + + @Override + public void setIcon(PImage icon) { + // TODO: set icon with glfw + } + + @Override + public void placeWindow(int[] location, int[] editorLocation) { + if (window == MemoryUtil.NULL) return; + + int x, y; + if (location != null) { + x = location[0]; + y = location[1]; + } else if (editorLocation != null) { + x = editorLocation[0] - 20; + y = editorLocation[1]; + + if (x - sketch.sketchWidth() < 10) { + // doesn't fit, center on screen instead + long monitor = GLFW.glfwGetPrimaryMonitor(); + var vidmode = GLFW.glfwGetVideoMode(monitor); + if (vidmode != null) { + x = (vidmode.width() - sketch.sketchWidth()) / 2; + y = (vidmode.height() - sketch.sketchHeight()) / 2; + } else { + x = 100; + y = 100; + } + } + } else { + // center on primary monitor + long monitor = GLFW.glfwGetPrimaryMonitor(); + var vidmode = GLFW.glfwGetVideoMode(monitor); + if (vidmode != null) { + x = (vidmode.width() - sketch.sketchWidth()) / 2; + y = (vidmode.height() - sketch.sketchHeight()) / 2; + } else { + x = 100; + y = 100; + } + } + + GLFW.glfwSetWindowPos(window, x, y); + } + + @Override + public void placePresent(int stopColor) { + // TODO: implement present mode support + } + + @Override + public void setLocation(int x, int y) { + if (window != MemoryUtil.NULL) { + GLFW.glfwSetWindowPos(window, x, y); + } + } + + @Override + public void setSize(int width, int height) { + if (width == sketch.width && height == sketch.height) { + return; + } + + sketch.width = width; + sketch.height = height; + graphics.setSize(width, height); + + if (window != MemoryUtil.NULL) { + GLFW.glfwSetWindowSize(window, width, height); + } + } + + @Override + public void setFrameRate(float fps) { + frameRateTarget = fps; + frameRatePeriod = (long) (1000000000.0 / frameRateTarget); + } + + @Override + public void setCursor(int kind) { + // TODO: implement cursor types + } + + @Override + public void setCursor(PImage image, int hotspotX, int hotspotY) { + // TODO: implement custom cursor + } + + @Override + public void showCursor() { + if (window != MemoryUtil.NULL) { + GLFW.glfwSetInputMode(window, GLFW.GLFW_CURSOR, GLFW.GLFW_CURSOR_NORMAL); + } + } + + @Override + public void hideCursor() { + if (window != MemoryUtil.NULL) { + GLFW.glfwSetInputMode(window, GLFW.GLFW_CURSOR, GLFW.GLFW_CURSOR_HIDDEN); + } + } + + @Override + public PImage loadImage(String path, Object... args) { + // TODO: implement image loading without awt + throw new UnsupportedOperationException("Image loading not yet implemented for WebGPU"); + } + + @Override + public boolean openLink(String url) { + // TODO: implement links without awt + return false; + } + + @Override + public void selectInput(String prompt, String callback, File file, Object callbackObject) { + // TODO: select input without awt + throw new UnsupportedOperationException("File dialogs not yet implemented for WebGPU"); + } + + @Override + public void selectOutput(String prompt, String callback, File file, Object callbackObject) { + // TODO: file dialogs without awt + throw new UnsupportedOperationException("File dialogs not yet implemented for WebGPU"); + } + + @Override + public void selectFolder(String prompt, String callback, File file, Object callbackObject) { + // TODO: folder selection without awt + throw new UnsupportedOperationException("Folder selection not yet implemented for WebGPU"); + } + + @Override + public void startThread() { + if (running) { + throw new IllegalStateException("Draw loop already running"); + } + + running = true; + runDrawLoop(); + } + + protected void runDrawLoop() { + GLFW.glfwShowWindow(window); + + long beforeTime = System.nanoTime(); + long overSleepTime = 0L; + + sketch.start(); + + while (running && !sketch.finished) { + checkPause(); + + GLFW.glfwPollEvents(); + + if (GLFW.glfwWindowShouldClose(window)) { + sketch.exit(); + break; + } + + // render! + sketch.handleDraw(); + + // frame pacing + long afterTime = System.nanoTime(); + long timeDiff = afterTime - beforeTime; + long sleepTime = (frameRatePeriod - timeDiff) - overSleepTime; + + if (sleepTime > 0) { + try { + Thread.sleep(sleepTime / 1000000L, (int) (sleepTime % 1000000L)); + } catch (InterruptedException ex) { + Thread.currentThread().interrupt(); + } + overSleepTime = (System.nanoTime() - afterTime) - sleepTime; + } else { + overSleepTime = 0L; + } + + beforeTime = System.nanoTime(); + } + + // cleanup + sketch.dispose(); + } + + @Override + public void pauseThread() { + paused = true; + } + + protected void checkPause() { + if (paused) { + pauseLock.lock(); + try { + while (paused) { + pauseCondition.await(); + } + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } finally { + pauseLock.unlock(); + } + } + } + + @Override + public void resumeThread() { + pauseLock.lock(); + try { + paused = false; + pauseCondition.signalAll(); + } finally { + pauseLock.unlock(); + } + } + + @Override + public boolean stopThread() { + if (!running) { + return false; + } + + running = false; + + try { + if (window != MemoryUtil.NULL) { + GLFW.glfwDestroyWindow(window); + window = MemoryUtil.NULL; + + if (windowCount.decrementAndGet() == 0) { + if (glfwInitialized.compareAndSet(true, false)) { + GLFW.glfwTerminate(); + System.out.println("PSurfaceGLFW: GLFW terminated"); + } + } + } + } finally { + // run destructors always + freeCallbacks(); + } + + return true; + } + + private void freeCallbacks() { + if (framebufferSizeCallback != null) { + framebufferSizeCallback.free(); + framebufferSizeCallback = null; + } + if (windowPosCallback != null) { + windowPosCallback.free(); + windowPosCallback = null; + } + } + + + @Override + public boolean isStopped() { + return !running; + } +} diff --git a/core/src/processing/webgpu/PWebGPU.java b/core/src/processing/webgpu/PWebGPU.java index e16e0fae2..b0e76b203 100644 --- a/core/src/processing/webgpu/PWebGPU.java +++ b/core/src/processing/webgpu/PWebGPU.java @@ -5,8 +5,7 @@ import java.lang.foreign.MemorySegment; import static java.lang.foreign.MemorySegment.NULL; -import static processing.ffi.processing_h.processing_check_error; -import static processing.ffi.processing_h.processing_init; +import static processing.ffi.processing_h.*; /** * PWebGPU provides the native interface layer for libProcessing's WebGPU support. @@ -15,7 +14,6 @@ public class PWebGPU { static { ensureLoaded(); - init(); } /** @@ -27,12 +25,56 @@ public static void ensureLoaded() { /** * Initializes the WebGPU subsystem. Must be called before any other WebGPU methods. + * This should be called from the same thread that will call update(). */ public static void init() { processing_init(); checkError(); } + /** + * Creates a WebGPU surface from a native window handle. + * + * @param windowHandle The native window handle + * @param width Window width in physical pixels + * @param height Window height in phsyical pixels + * @param scaleFactor os provided scale factor + * @return Window ID to use for subsequent operations + */ + public static long createSurface(long windowHandle, int width, int height, float scaleFactor) { + long windowId = processing_create_surface(windowHandle, width, height, scaleFactor); + checkError(); + return windowId; + } + + /** + * Updates a window's size. + * + * @param windowId The window ID returned from createSurface + * @param width New physical window width in pixels + * @param height New physical window height in pixels + */ + public static void windowResized(long windowId, int width, int height) { + processing_window_resized(windowId, width, height); + checkError(); + } + + /** + * Updates the WebGPU subsystem. Should be called once per frame after all drawing is complete. + */ + public static void update() { + processing_update(); + checkError(); + } + + /** + * Cleans up the WebGPU subsystem. Should be called on application exit. + */ + public static void exit() { + processing_exit((byte) 0); + checkError(); + } + /** * Checks for errors from the native library and throws a PWebGPUException if an error occurred. */ diff --git a/java/src/processing/mode/java/runner/Runner.java b/java/src/processing/mode/java/runner/Runner.java index a9baf1ea6..de8ef2857 100644 --- a/java/src/processing/mode/java/runner/Runner.java +++ b/java/src/processing/mode/java/runner/Runner.java @@ -342,6 +342,9 @@ protected StringList getMachineParams() { // No longer needed / doesn't seem to do anything differently //params.append("-Dcom.apple.mrj.application.apple.menu.about.name=" + // build.getSketchClassName()); + + // required for GLFW and Metal when using WebGPU + params.append("-XstartOnFirstThread"); } /* if (Platform.isWindows()) { @@ -380,6 +383,10 @@ protected StringList getMachineParams() { // http://processing.org/bugs/bugzilla/1188.html params.append("-ea"); + // we need to open up access to internal jdk modules for libraries that use reflection + // this will break at some point in the future when these modules are removed from the jdk :( + params.append("--enable-native-access=ALL-UNNAMED"); + return params; } @@ -508,6 +515,9 @@ protected StringList getSketchParams(boolean present, String[] args) { } */ + // TODO: excise AWT to make webgpu work properly + params.append(PApplet.ARGS_DISABLE_AWT); + params.append(build.getSketchClassName()); } // Add command-line arguments to be given to the sketch itself diff --git a/libProcessing/Cargo.lock b/libProcessing/Cargo.lock index 507d667e6..cd58b5248 100644 --- a/libProcessing/Cargo.lock +++ b/libProcessing/Cargo.lock @@ -2,57 +2,71 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "ab_glyph" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + [[package]] name = "accesskit" -version = "0.18.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "becf0eb5215b6ecb0a739c31c21bd83c4f326524c9b46b7e882d77559b60a529" +checksum = "cf203f9d3bd8f29f98833d1fbef628df18f759248a547e7e01cfbf63cda36a99" [[package]] name = "accesskit_consumer" -version = "0.27.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0bf66a7bf0b7ea4fd7742d50b64782a88f99217cf246b3f93b4162528dde520" +checksum = "bdd06f5fea9819250fffd4debf926709f3593ac22f8c1541a2573e5ee0ca01cd" dependencies = [ "accesskit", "hashbrown 0.15.5", - "immutable-chunkmap", ] [[package]] name = "accesskit_macos" -version = "0.19.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e230718177753b4e4ad9e1d9f6cfc2f4921212d4c1c480b253f526babb258d" +checksum = "93fbaf15815f39084e0cb24950c232f0e3634702c2dfbf182ae3b4919a4a1d45" dependencies = [ "accesskit", "accesskit_consumer", "hashbrown 0.15.5", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", ] [[package]] name = "accesskit_windows" -version = "0.25.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65178f3df98a51e4238e584fcb255cb1a4f9111820848eeddd37663be40a625f" +checksum = "792991159fa9ba57459de59e12e918bb90c5346fea7d40ac1a11f8632b41e63a" dependencies = [ "accesskit", "accesskit_consumer", "hashbrown 0.15.5", - "paste", "static_assertions", - "windows 0.58.0", - "windows-core 0.58.0", + "windows 0.61.3", + "windows-core 0.61.2", ] [[package]] name = "accesskit_winit" -version = "0.25.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d941bb8c414caba6e206de669c7dc0dbeb305640ea890772ee422a40e6b89f" +checksum = "cd9db0ea66997e3f4eae4a5f2c6b6486cf206642639ee629dbbb860ace1dec87" dependencies = [ "accesskit", "accesskit_macos", @@ -67,6 +81,19 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.3" @@ -331,12 +358,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -345,18 +366,18 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bevy" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8369c16b7c017437021341521f8b4a0d98e1c70113fb358c3258ae7d661d79" +checksum = "342f7e9335416dc98642d5747c4ed8a6ad9f7244a36d5b2b7a1b7910e4d8f524" dependencies = [ "bevy_internal", ] [[package]] name = "bevy_a11y" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3561712cf49074d89e9989bfc2e6c6add5d33288f689db9a0c333300d2d004" +checksum = "3917cd35096fb2fe176632740b68a4b53cb61006cfff13d66ef47ee2c2478d53" dependencies = [ "accesskit", "bevy_app", @@ -365,29 +386,37 @@ dependencies = [ "bevy_reflect", ] +[[package]] +name = "bevy_android" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a9dd9488c77fa2ea31b5da2f978aab7f1cc82e6d2c3be0adf637d9fd7cb6c8" +dependencies = [ + "android-activity", +] + [[package]] name = "bevy_animation" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49796627726d0b9a722ad9a0127719e7c1868f474d6575ec0f411e8299c4d7bb" +checksum = "00d2eadb9c20d87ab3a5528a8df483492d5b8102d3f2d61c7b1ed23f40a79166" dependencies = [ + "bevy_animation_macros", "bevy_app", "bevy_asset", "bevy_color", "bevy_derive", "bevy_ecs", - "bevy_log", "bevy_math", "bevy_mesh", "bevy_platform", "bevy_reflect", - "bevy_render", "bevy_time", "bevy_transform", "bevy_utils", "blake3", "derive_more", - "downcast-rs", + "downcast-rs 2.0.2", "either", "petgraph", "ron", @@ -399,11 +428,44 @@ dependencies = [ "uuid", ] +[[package]] +name = "bevy_animation_macros" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aec80b84926f730f6df81b9bc07255c120f57aaf7ac577f38d12dd8e1a0268ad" +dependencies = [ + "bevy_macro_utils", + "quote", + "syn", +] + +[[package]] +name = "bevy_anti_alias" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c1adb85fe0956d6c3b6f90777b829785bb7e29a48f58febeeefd2bad317713" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_core_pipeline", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_utils", + "tracing", +] + [[package]] name = "bevy_app" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4491cc4c718ae76b4c6883df58b94cc88b32dcd894ea8d5b603c7c7da72ca967" +checksum = "9f582409b4ed3850d9b66ee94e71a0e2c20e7068121d372530060c4dfcba66fa" dependencies = [ "bevy_derive", "bevy_ecs", @@ -414,7 +476,7 @@ dependencies = [ "cfg-if", "console_error_panic_hook", "ctrlc", - "downcast-rs", + "downcast-rs 2.0.2", "log", "thiserror 2.0.17", "variadics_please", @@ -424,14 +486,15 @@ dependencies = [ [[package]] name = "bevy_asset" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56111d9b88d8649f331a667d9d72163fb26bd09518ca16476d238653823db1e" +checksum = "9e6ee42e74a64a46ab91bd1c0155f8abe5b732bdb948a9b26e541456cc7940e5" dependencies = [ "async-broadcast", "async-fs", "async-lock", "atomicow", + "bevy_android", "bevy_app", "bevy_asset_macros", "bevy_ecs", @@ -439,13 +502,12 @@ dependencies = [ "bevy_reflect", "bevy_tasks", "bevy_utils", - "bevy_window", "bitflags 2.9.4", "blake3", "crossbeam-channel", "derive_more", "disqualified", - "downcast-rs", + "downcast-rs 2.0.2", "either", "futures-io", "futures-lite", @@ -464,9 +526,9 @@ dependencies = [ [[package]] name = "bevy_asset_macros" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4cca3e67c0ec760d8889d42293d987ce5da92eaf9c592bf5d503728a63b276d" +checksum = "d03711d2c087227f64ba85dd38a99d4d6893f80d2475c2e77fb90a883760a055" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -476,27 +538,53 @@ dependencies = [ [[package]] name = "bevy_audio" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b4f6f2a5c6c0e7c6825e791d2a061c76c2d6784f114c8f24382163fabbfaaa" +checksum = "f83620c82f281848c02ed4b65133a0364512b4eca2b39cd21a171e50e2986d89" dependencies = [ "bevy_app", "bevy_asset", - "bevy_derive", "bevy_ecs", "bevy_math", "bevy_reflect", "bevy_transform", + "coreaudio-sys", "cpal", "rodio", "tracing", ] +[[package]] +name = "bevy_camera" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b70d79ccbd8bfefc79f33a104dfd82ae2f5276ce04d6df75787bfa3edc4c4c1a" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_color", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_reflect", + "bevy_transform", + "bevy_utils", + "bevy_window", + "derive_more", + "downcast-rs 2.0.2", + "serde", + "smallvec", + "thiserror 2.0.17", + "wgpu-types", +] + [[package]] name = "bevy_color" -version = "0.16.2" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c101cbe1e26b8d701eb77263b14346e2e0cbbd2a6e254b9b1aead814e5ca8d3" +checksum = "94dc78477c1c208c0cd221c64e907aba8ba165f39bebb72adc6180e1a13e8938" dependencies = [ "bevy_math", "bevy_reflect", @@ -510,29 +598,28 @@ dependencies = [ [[package]] name = "bevy_core_pipeline" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed46363cad80dc00f08254c3015232bd6f640738403961c6d63e7ecfc61625" +checksum = "0c866a2fe33ec27a612d883223d30f1857aa852766b21a9603628735dace632f" dependencies = [ "bevy_app", "bevy_asset", + "bevy_camera", "bevy_color", "bevy_derive", - "bevy_diagnostic", "bevy_ecs", "bevy_image", "bevy_math", "bevy_platform", "bevy_reflect", "bevy_render", + "bevy_shader", "bevy_transform", "bevy_utils", "bevy_window", "bitflags 2.9.4", - "bytemuck", "nonmax", "radsort", - "serde", "smallvec", "thiserror 2.0.17", "tracing", @@ -540,9 +627,9 @@ dependencies = [ [[package]] name = "bevy_derive" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b837bf6c51806b10ebfa9edf1844ad80a3a0760d6c5fac4e90761df91a8901a" +checksum = "b8c733807158f8fcac68e23222e69ed91a6492ae9410fc2c145b9bb182cfd63e" dependencies = [ "bevy_macro_utils", "quote", @@ -551,16 +638,16 @@ dependencies = [ [[package]] name = "bevy_diagnostic" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48797366f312a8f31e237d08ce3ee70162591282d2bfe7c5ad8be196fb263e55" +checksum = "f12fa32312818c08aa4035bebe9fb3f62aaf7efae33688e718dd6ee6c0147493" dependencies = [ + "atomic-waker", "bevy_app", "bevy_ecs", "bevy_platform", "bevy_tasks", "bevy_time", - "bevy_utils", "const-fnv1a-hash", "log", "serde", @@ -569,9 +656,9 @@ dependencies = [ [[package]] name = "bevy_ecs" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2bf6521aae57a0ec3487c4bfb59e36c4a378e834b626a4bea6a885af2fdfe7" +checksum = "69d929d32190cfcde6efd2df493601c4dbc18a691fd9775a544c951c3c112e1a" dependencies = [ "arrayvec", "bevy_ecs_macros", @@ -584,12 +671,12 @@ dependencies = [ "bumpalo", "concurrent-queue", "derive_more", - "disqualified", "fixedbitset", "indexmap", "log", "nonmax", "serde", + "slotmap", "smallvec", "thiserror 2.0.17", "variadics_please", @@ -597,9 +684,9 @@ dependencies = [ [[package]] name = "bevy_ecs_macros" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38748d6f3339175c582d751f410fb60a93baf2286c3deb7efebb0878dce7f413" +checksum = "6eeddfb80a2e000663e87be9229c26b4da92bddbc06c8776bc0d1f4a7f679079" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -609,9 +696,9 @@ dependencies = [ [[package]] name = "bevy_encase_derive" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8148f4edee470a2ea5cad010184c492a4c94c36d7a7158ea28e134ea87f274ab" +checksum = "7449e5903594a00f007732ba232af0c527ad4e6e3d29bc3e195ec78dbd20c8b2" dependencies = [ "bevy_macro_utils", "encase_derive_impl", @@ -619,16 +706,15 @@ dependencies = [ [[package]] name = "bevy_gilrs" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97efef87c631949e67d06bb5d7dfd2a5f936b3b379afb6b1485b08edbb219b87" +checksum = "28ff35087f25406006338e6d57f31f313a60f3a5e09990ab7c7b5203b0b55077" dependencies = [ "bevy_app", "bevy_ecs", "bevy_input", "bevy_platform", "bevy_time", - "bevy_utils", "gilrs", "thiserror 2.0.17", "tracing", @@ -636,22 +722,26 @@ dependencies = [ [[package]] name = "bevy_gizmos" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7823154a9682128c261d8bddb3a4d7192a188490075c527af04520c2f0f8aad6" +checksum = "0d3f174faa13041634060dd99f6f59c29997fd62f40252f0466c2ebea8603d4d" dependencies = [ "bevy_app", "bevy_asset", + "bevy_camera", "bevy_color", "bevy_core_pipeline", "bevy_ecs", "bevy_gizmos_macros", "bevy_image", + "bevy_light", "bevy_math", + "bevy_mesh", "bevy_pbr", "bevy_reflect", "bevy_render", - "bevy_sprite", + "bevy_shader", + "bevy_sprite_render", "bevy_time", "bevy_transform", "bevy_utils", @@ -661,30 +751,30 @@ dependencies = [ [[package]] name = "bevy_gizmos_macros" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f378f3b513218ddc78254bbe76536d9de59c1429ebd0c14f5d8f2a25812131ad" +checksum = "714273aa7f285c0aaa874b7fbe37fe4e6e45355e3e6f3321aefa1b78cda259e0" dependencies = [ "bevy_macro_utils", - "proc-macro2", "quote", "syn", ] [[package]] name = "bevy_gltf" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a080237c0b8842ccc15a06d3379302c68580eeea4497b1c7387e470eda1f07" +checksum = "13d67e954b20551818f7cdb33f169ab4db64506ada66eb4d60d3cb8861103411" dependencies = [ - "base64 0.22.1", + "base64", "bevy_animation", "bevy_app", "bevy_asset", + "bevy_camera", "bevy_color", - "bevy_core_pipeline", "bevy_ecs", "bevy_image", + "bevy_light", "bevy_math", "bevy_mesh", "bevy_pbr", @@ -694,7 +784,6 @@ dependencies = [ "bevy_scene", "bevy_tasks", "bevy_transform", - "bevy_utils", "fixedbitset", "gltf", "itertools 0.14.0", @@ -708,13 +797,14 @@ dependencies = [ [[package]] name = "bevy_image" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e6e900cfecadbc3149953169e36b9e26f922ed8b002d62339d8a9dc6129328" +checksum = "168de8239b2aedd2eeef9f76ae1909b2fdf859b11dcdb4d4d01b93f5f2c771be" dependencies = [ "bevy_app", "bevy_asset", "bevy_color", + "bevy_ecs", "bevy_math", "bevy_platform", "bevy_reflect", @@ -736,16 +826,15 @@ dependencies = [ [[package]] name = "bevy_input" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d6b6516433f6f7d680f648d04eb1866bb3927a1782d52f74831b62042f3cd1" +checksum = "3cf4074b2d0d6680b4deb308ded7b4e8b1b99181c0502e2632e78af815b26f01" dependencies = [ "bevy_app", "bevy_ecs", "bevy_math", "bevy_platform", "bevy_reflect", - "bevy_utils", "derive_more", "log", "smol_str", @@ -754,14 +843,15 @@ dependencies = [ [[package]] name = "bevy_input_focus" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e2d079fda74d1416e0a57dac29ea2b79ff77f420cd6b87f833d3aa29a46bc4d" +checksum = "70761eba0f616a1caa761457bff2b8ae80c9916f39d167fab8c2d5c98d2b8951" dependencies = [ "bevy_app", "bevy_ecs", "bevy_input", "bevy_math", + "bevy_picking", "bevy_reflect", "bevy_window", "log", @@ -770,15 +860,18 @@ dependencies = [ [[package]] name = "bevy_internal" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "857da8785678fde537d02944cd20dec9cafb7d4c447efe15f898dc60e733cacd" +checksum = "f43985739584f3a5d43026aa1edd772f064830be46c497518f05f7dfbc886bba" dependencies = [ "bevy_a11y", + "bevy_android", "bevy_animation", + "bevy_anti_alias", "bevy_app", "bevy_asset", "bevy_audio", + "bevy_camera", "bevy_color", "bevy_core_pipeline", "bevy_derive", @@ -790,36 +883,64 @@ dependencies = [ "bevy_image", "bevy_input", "bevy_input_focus", + "bevy_light", "bevy_log", "bevy_math", + "bevy_mesh", "bevy_pbr", "bevy_picking", "bevy_platform", + "bevy_post_process", "bevy_ptr", "bevy_reflect", "bevy_render", "bevy_scene", + "bevy_shader", "bevy_sprite", + "bevy_sprite_render", "bevy_state", "bevy_tasks", "bevy_text", "bevy_time", "bevy_transform", "bevy_ui", + "bevy_ui_render", "bevy_utils", "bevy_window", "bevy_winit", ] +[[package]] +name = "bevy_light" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cad00ab66d1e93edb928be66606a71066f3b1cbc9f414720e290ef5361eb6237" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_platform", + "bevy_reflect", + "bevy_transform", + "bevy_utils", + "tracing", +] + [[package]] name = "bevy_log" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a61ee8aef17a974f5ca481dcedf0c2bd52670e231d4c4bc9ddef58328865f9" +checksum = "4ae217a035714a37b779487f82edc4c7c1223f7088d7ad94054f29f524d61c51" dependencies = [ "android_log-sys", "bevy_app", "bevy_ecs", + "bevy_platform", "bevy_utils", "tracing", "tracing-log", @@ -830,22 +951,22 @@ dependencies = [ [[package]] name = "bevy_macro_utils" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052eeebcb8e7e072beea5031b227d9a290f8a7fbbb947573ab6ec81df0fb94be" +checksum = "17dbc3f8948da58b3c17767d20fd3cd35fe4721ed19a9a3204a6f1d6c9951bdd" dependencies = [ "parking_lot", "proc-macro2", "quote", "syn", - "toml_edit 0.22.27", + "toml_edit 0.23.7", ] [[package]] name = "bevy_math" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68553e0090fe9c3ba066c65629f636bd58e4ebd9444fdba097b91af6cd3e243f" +checksum = "f7a41e368ffa95ae2a353197d1ae3993f4d3d471444d80b65c932db667ea7b9e" dependencies = [ "approx", "bevy_reflect", @@ -863,10 +984,11 @@ dependencies = [ [[package]] name = "bevy_mesh" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10399c7027001edbc0406d7d0198596b1f07206c1aae715274106ba5bdcac40" +checksum = "b6255244b71153b305fddb4e6f827cb97ed51f276b6e632f5fc46538647948f6" dependencies = [ + "bevy_app", "bevy_asset", "bevy_derive", "bevy_ecs", @@ -876,11 +998,10 @@ dependencies = [ "bevy_platform", "bevy_reflect", "bevy_transform", - "bevy_utils", "bitflags 2.9.4", "bytemuck", + "derive_more", "hexasphere", - "serde", "thiserror 2.0.17", "tracing", "wgpu-types", @@ -888,41 +1009,40 @@ dependencies = [ [[package]] name = "bevy_mikktspace" -version = "0.16.1" +version = "0.17.0-dev" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb60c753b968a2de0fd279b76a3d19517695e771edb4c23575c7f92156315de" -dependencies = [ - "glam", -] +checksum = "7ef8e4b7e61dfe7719bb03c884dc270cd46a82efb40f93e9933b990c5c190c59" [[package]] name = "bevy_pbr" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5e0b4eb871f364a0d217f70f6c41d7fdc6f9f931fa1abbf222180c03d0ae410" +checksum = "cf8c76337a6ae9d73d50be168aeee974d05fdeda9129a413eaff719e3b7b5fea" dependencies = [ "bevy_app", "bevy_asset", + "bevy_camera", "bevy_color", "bevy_core_pipeline", "bevy_derive", "bevy_diagnostic", "bevy_ecs", "bevy_image", + "bevy_light", "bevy_math", + "bevy_mesh", "bevy_platform", "bevy_reflect", "bevy_render", + "bevy_shader", "bevy_transform", "bevy_utils", - "bevy_window", "bitflags 2.9.4", "bytemuck", "derive_more", "fixedbitset", "nonmax", "offset-allocator", - "radsort", "smallvec", "static_assertions", "thiserror 2.0.17", @@ -931,12 +1051,13 @@ dependencies = [ [[package]] name = "bevy_picking" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed04757938655ed8094ea1efb533f99063a8b22abffc22010c694d291522850" +checksum = "3a232a8ea4dc9b83c08226f56b868acb1ead06946a95d8b9c8cbbcc860cd8090" dependencies = [ "bevy_app", "bevy_asset", + "bevy_camera", "bevy_derive", "bevy_ecs", "bevy_input", @@ -944,10 +1065,8 @@ dependencies = [ "bevy_mesh", "bevy_platform", "bevy_reflect", - "bevy_render", "bevy_time", "bevy_transform", - "bevy_utils", "bevy_window", "crossbeam-channel", "tracing", @@ -956,33 +1075,66 @@ dependencies = [ [[package]] name = "bevy_platform" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7573dc824a1b08b4c93fdbe421c53e1e8188e9ca1dd74a414455fe571facb47" +checksum = "10cf8cda162688c95250e74cffaa1c3a04597f105d4ca35554106f107308ea57" dependencies = [ - "cfg-if", "critical-section", - "foldhash", - "getrandom 0.2.16", - "hashbrown 0.15.5", + "foldhash 0.2.0", + "futures-channel", + "getrandom", + "hashbrown 0.16.0", + "js-sys", "portable-atomic", "portable-atomic-util", "serde", "spin", + "wasm-bindgen", + "wasm-bindgen-futures", "web-time", ] +[[package]] +name = "bevy_post_process" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26ee8ab6043f8bbe43e9c16bbdde0c5e7289b99e62cd8aad1a2a4166a7f2bce6" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_transform", + "bevy_utils", + "bevy_window", + "bitflags 2.9.4", + "nonmax", + "radsort", + "smallvec", + "thiserror 2.0.17", + "tracing", +] + [[package]] name = "bevy_ptr" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7370d0e46b60e071917711d0860721f5347bc958bf325975ae6913a5dfcf01" +checksum = "28ab4074e7b781bab84e9b0a41ede245d673d1f75646ce0db27643aedcfb3a85" [[package]] name = "bevy_reflect" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daeb91a63a1a4df00aa58da8cc4ddbd4b9f16ab8bb647c5553eb156ce36fa8c2" +checksum = "333df3f5947b7e62728eb5c0b51d679716b16c7c5283118fed4563f13230954e" dependencies = [ "assert_type_match", "bevy_platform", @@ -991,10 +1143,11 @@ dependencies = [ "bevy_utils", "derive_more", "disqualified", - "downcast-rs", + "downcast-rs 2.0.2", "erased-serde", - "foldhash", + "foldhash 0.2.0", "glam", + "inventory", "petgraph", "serde", "smallvec", @@ -1007,11 +1160,12 @@ dependencies = [ [[package]] name = "bevy_reflect_derive" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ddadc55fe16b45faaa54ab2f9cb00548013c74812e8b018aa172387103cce6" +checksum = "0205dce9c5a4d8d041b263bcfd96e9d9d6f3d49416e12db347ab5778b3071fe1" dependencies = [ "bevy_macro_utils", + "indexmap", "proc-macro2", "quote", "syn", @@ -1020,13 +1174,14 @@ dependencies = [ [[package]] name = "bevy_render" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef91fed1f09405769214b99ebe4390d69c1af5cdd27967deae9135c550eb1667" +checksum = "70d6a5d47ebb247e4ecaaf4a3b0310b7c518728ff2362c69f4220d0d3228e17d" dependencies = [ "async-channel", "bevy_app", "bevy_asset", + "bevy_camera", "bevy_color", "bevy_derive", "bevy_diagnostic", @@ -1038,6 +1193,7 @@ dependencies = [ "bevy_platform", "bevy_reflect", "bevy_render_macros", + "bevy_shader", "bevy_tasks", "bevy_time", "bevy_transform", @@ -1045,22 +1201,17 @@ dependencies = [ "bevy_window", "bitflags 2.9.4", "bytemuck", - "codespan-reporting", "derive_more", - "downcast-rs", + "downcast-rs 2.0.2", "encase", "fixedbitset", - "futures-lite", "image", "indexmap", "js-sys", - "ktx2", "naga", - "naga_oil", "nonmax", "offset-allocator", "send_wrapper", - "serde", "smallvec", "thiserror 2.0.17", "tracing", @@ -1072,9 +1223,9 @@ dependencies = [ [[package]] name = "bevy_render_macros" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abd42cf6c875bcf38da859f8e731e119a6aff190d41dd0a1b6000ad57cf2ed3d" +checksum = "a7e8b553adf0a4f9f059c5c2dcb52d9ac09abede1c322a92b43b9f4bb11c3843" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -1084,17 +1235,17 @@ dependencies = [ [[package]] name = "bevy_scene" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c52ca165200995fe8afd2a1a6c03e4ffee49198a1d4653d32240ea7f217d4ab" +checksum = "e601ffeebbdaba1193f823dbdc9fc8787a24cf83225a72fee4def5c27a18778a" dependencies = [ "bevy_app", "bevy_asset", + "bevy_camera", "bevy_derive", "bevy_ecs", "bevy_platform", "bevy_reflect", - "bevy_render", "bevy_transform", "bevy_utils", "derive_more", @@ -1103,41 +1254,85 @@ dependencies = [ "uuid", ] +[[package]] +name = "bevy_shader" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cef8f8e53776d286eb62bb60164f30671f07005ff407e94ec1176e9426d1477" +dependencies = [ + "bevy_asset", + "bevy_platform", + "bevy_reflect", + "naga", + "naga_oil", + "serde", + "thiserror 2.0.17", + "tracing", + "wgpu-types", +] + [[package]] name = "bevy_sprite" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ccae7bab2cb956fb0434004c359e432a3a1a074a6ef4eb471f1fb099f0b620b" +checksum = "74bb52fa52caa1cc8d95acf45e52efc0c72b59755c2f0801a30fdab367921db0" dependencies = [ "bevy_app", "bevy_asset", + "bevy_camera", "bevy_color", - "bevy_core_pipeline", "bevy_derive", "bevy_ecs", "bevy_image", "bevy_math", + "bevy_mesh", "bevy_picking", + "bevy_reflect", + "bevy_text", + "bevy_transform", + "bevy_window", + "radsort", + "tracing", + "wgpu-types", +] + +[[package]] +name = "bevy_sprite_render" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31bb90a9139b04568bd30b2492ba61234092d95a7f7e3c84b55369b16d7e261b" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mesh", "bevy_platform", "bevy_reflect", "bevy_render", + "bevy_shader", + "bevy_sprite", + "bevy_text", "bevy_transform", "bevy_utils", - "bevy_window", "bitflags 2.9.4", "bytemuck", "derive_more", "fixedbitset", "nonmax", - "radsort", "tracing", ] [[package]] name = "bevy_state" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155d3cd97b900539008cdcaa702f88b724d94b08977b8e591a32536ce66faa8c" +checksum = "fe4e955f36cdc7b31556e4619a653dcf65d46967d90d36fb788f746c8e89257e" dependencies = [ "bevy_app", "bevy_ecs", @@ -1151,43 +1346,39 @@ dependencies = [ [[package]] name = "bevy_state_macros" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2481c1304fd2a1851a0d4cb63a1ce6421ae40f3f0117cbc9882963ee4c9bb609" +checksum = "5c3e4e32b1b96585740a2b447661af7db1b9d688db5e4d96da50461cd8f5ce63" dependencies = [ "bevy_macro_utils", - "proc-macro2", "quote", "syn", ] [[package]] name = "bevy_tasks" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b674242641cab680688fc3b850243b351c1af49d4f3417a576debd6cca8dcf5" +checksum = "18839182775f30d26f0f84d9de85d25361bb593c99517a80b64ede6cbaf41adc" dependencies = [ "async-channel", "async-executor", "async-task", "atomic-waker", "bevy_platform", - "cfg-if", "concurrent-queue", "crossbeam-queue", "derive_more", - "futures-channel", "futures-lite", "heapless", "pin-project", - "wasm-bindgen-futures", ] [[package]] name = "bevy_text" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d76c85366159f5f54110f33321c76d8429cfd8f39638f26793a305dae568b60" +checksum = "cc1b759cf2ed8992132bd541ebb9ffcfa777d2faf3596d418fb25984bc6677d8" dependencies = [ "bevy_app", "bevy_asset", @@ -1199,25 +1390,21 @@ dependencies = [ "bevy_math", "bevy_platform", "bevy_reflect", - "bevy_render", - "bevy_sprite", - "bevy_transform", "bevy_utils", - "bevy_window", "cosmic-text", "serde", "smallvec", "sys-locale", "thiserror 2.0.17", "tracing", - "unicode-bidi", + "wgpu-types", ] [[package]] name = "bevy_time" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc98eb356c75be04fbbc77bb3d8ffa24c8bacd99f76111cee23d444be6ac8c9c" +checksum = "1a52edd3d30ed94074f646ba1c9914e407af9abe5b6fb7a4322c855341a536cc" dependencies = [ "bevy_app", "bevy_ecs", @@ -1230,9 +1417,9 @@ dependencies = [ [[package]] name = "bevy_transform" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df218e440bb9a19058e1b80a68a031c887bcf7bd3a145b55f361359a2fa3100d" +checksum = "7995ae14430b1a268d1e4f098ab770e8af880d2df5e4e37161b47d8d9e9625bd" dependencies = [ "bevy_app", "bevy_ecs", @@ -1248,16 +1435,16 @@ dependencies = [ [[package]] name = "bevy_ui" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a4d2ba51865bc3039af29a26b4f52c48b54cc758369f52004caf4b6f03770" +checksum = "cc999815a67a6b2fc911df9eea27af703ff656aed6fd31d8606dced701f07fd6" dependencies = [ "accesskit", "bevy_a11y", "bevy_app", "bevy_asset", + "bevy_camera", "bevy_color", - "bevy_core_pipeline", "bevy_derive", "bevy_ecs", "bevy_image", @@ -1266,61 +1453,91 @@ dependencies = [ "bevy_picking", "bevy_platform", "bevy_reflect", - "bevy_render", "bevy_sprite", "bevy_text", "bevy_transform", "bevy_utils", "bevy_window", - "bytemuck", "derive_more", - "nonmax", "smallvec", "taffy", "thiserror 2.0.17", "tracing", + "uuid", +] + +[[package]] +name = "bevy_ui_render" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adae9770089e04339d003afe7abe7153fe71600d81c828f964c7ac329b04d5b9" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_color", + "bevy_core_pipeline", + "bevy_derive", + "bevy_ecs", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_platform", + "bevy_reflect", + "bevy_render", + "bevy_shader", + "bevy_sprite", + "bevy_sprite_render", + "bevy_text", + "bevy_transform", + "bevy_ui", + "bevy_utils", + "bytemuck", + "derive_more", + "tracing", ] [[package]] name = "bevy_utils" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f7a8905a125d2017e8561beefb7f2f5e67e93ff6324f072ad87c5fd6ec3b99" +checksum = "080254083c74d5f6eb0649d7cd6181bda277e8fe3c509ec68990a5d56ec23f24" dependencies = [ "bevy_platform", + "disqualified", "thread_local", ] [[package]] name = "bevy_window" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7e8ad0c17c3cc23ff5566ae2905c255e6986037fb041f74c446216f5c38431" +checksum = "f582478606d6b6e5c53befbe7612f038fdfb73f8a27f7aae644406637347acd4" dependencies = [ - "android-activity", "bevy_app", + "bevy_asset", "bevy_ecs", + "bevy_image", "bevy_input", "bevy_math", "bevy_platform", "bevy_reflect", - "bevy_utils", "log", "raw-window-handle", "serde", - "smol_str", ] [[package]] name = "bevy_winit" -version = "0.16.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a5e7f00c6b3b6823df5ec2a5e9067273607208919bc8c211773ebb9643c87f0" +checksum = "eb0ccf2faca4b4c156a26284d1bbf90a8cac8568a273adcd6c1a270c1342f3df" dependencies = [ "accesskit", "accesskit_winit", "approx", "bevy_a11y", + "bevy_android", "bevy_app", "bevy_asset", "bevy_derive", @@ -1333,37 +1550,14 @@ dependencies = [ "bevy_platform", "bevy_reflect", "bevy_tasks", - "bevy_utils", "bevy_window", "bytemuck", "cfg-if", - "crossbeam-channel", - "raw-window-handle", "tracing", "wasm-bindgen", - "web-sys", - "wgpu-types", - "winit", -] - -[[package]] -name = "bindgen" -version = "0.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" -dependencies = [ - "bitflags 2.9.4", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash 1.1.0", - "shlex", - "syn", + "web-sys", + "wgpu-types", + "winit", ] [[package]] @@ -1384,30 +1578,15 @@ dependencies = [ "syn", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec 0.6.3", -] - [[package]] name = "bit-set" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bit-vec 0.8.0", + "bit-vec", ] -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bit-vec" version = "0.8.0" @@ -1426,6 +1605,7 @@ version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" dependencies = [ + "bytemuck", "serde", ] @@ -1454,7 +1634,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2", + "objc2 0.5.2", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.3", ] [[package]] @@ -1528,6 +1717,18 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop", + "rustix 0.38.44", + "wayland-backend", + "wayland-client", +] + [[package]] name = "cbindgen" version = "0.29.0" @@ -1626,10 +1827,11 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "codespan-reporting" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ + "serde", "termcolor", "unicode-width", ] @@ -1740,7 +1942,7 @@ checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", "core-foundation 0.9.4", - "core-graphics-types", + "core-graphics-types 0.1.3", "foreign-types", "libc", ] @@ -1756,6 +1958,17 @@ dependencies = [ "libc", ] +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.9.4", + "core-foundation 0.10.1", + "libc", +] + [[package]] name = "coreaudio-rs" version = "0.11.3" @@ -1773,14 +1986,14 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ceec7a6067e62d6f931a2baf6f3a751f4a892595bcec1461a3c94ef9949864b6" dependencies = [ - "bindgen 0.72.1", + "bindgen", ] [[package]] name = "cosmic-text" -version = "0.13.2" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e418dd4f5128c3e93eab12246391c54a20c496811131f85754dc8152ee207892" +checksum = "da46a9d5a8905cc538a4a5bceb6a4510de7a51049c5588c0114efce102bcbbe8" dependencies = [ "bitflags 2.9.4", "fontdb", @@ -1898,18 +2111,18 @@ checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" [[package]] name = "derive_more" -version = "1.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "1.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ "proc-macro2", "quote", @@ -1923,6 +2136,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "dispatch2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", +] + [[package]] name = "disqualified" version = "1.0.0" @@ -1947,6 +2170,12 @@ dependencies = [ "litrs", ] +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + [[package]] name = "downcast-rs" version = "2.0.2" @@ -1967,30 +2196,30 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "encase" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0a05902cf601ed11d564128448097b98ebe3c6574bd7b6a653a3d56d54aa020" +checksum = "02ba239319a4f60905966390f5e52799d868103a533bb7e27822792332504ddd" dependencies = [ "const_panic", "encase_derive", "glam", - "thiserror 1.0.69", + "thiserror 2.0.17", ] [[package]] name = "encase_derive" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "181d475b694e2dd56ae919ce7699d344d1fd259292d590c723a50d1189a2ea85" +checksum = "5223d6c647f09870553224f6e37261fe5567bc5a4f4cf13ed337476e79990f2f" dependencies = [ "encase_derive_impl", ] [[package]] name = "encase_derive_impl" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f97b51c5cc57ef7c5f7a0c57c250251c49ee4c28f819f87ac32f4aceabc36792" +checksum = "1796db3d892515842ca2dfb11124c4bb4a9e58d9f2c5c1072e5bca1b2334507b" dependencies = [ "proc-macro2", "quote", @@ -2111,6 +2340,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "font-types" version = "0.10.0" @@ -2211,20 +2446,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" dependencies = [ "rustix 1.1.2", - "windows-link", -] - -[[package]] -name = "getrandom" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", + "windows-link 0.2.1", ] [[package]] @@ -2234,9 +2456,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", "wasip2", + "wasm-bindgen", ] [[package]] @@ -2286,14 +2510,14 @@ dependencies = [ [[package]] name = "glam" -version = "0.29.3" +version = "0.30.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee" +checksum = "e12d847aeb25f41be4c0ec9587d624e9cd631bc007a8fd7ce3f5851e064c6460" dependencies = [ "bytemuck", "libm", "rand", - "serde", + "serde_core", ] [[package]] @@ -2434,6 +2658,7 @@ checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if", "crunchy", + "num-traits", "zerocopy", ] @@ -2452,9 +2677,7 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "equivalent", - "foldhash", - "serde", + "foldhash 0.1.5", ] [[package]] @@ -2462,6 +2685,10 @@ name = "hashbrown" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +dependencies = [ + "equivalent", + "serde", +] [[package]] name = "heapless" @@ -2488,9 +2715,9 @@ checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hexasphere" -version = "15.1.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c9e718d32b6e6b2b32354e1b0367025efdd0b11d6a740b905ddf5db1074679" +checksum = "29a164ceff4500f2a72b1d21beaa8aa8ad83aec2b641844c659b190cb3ea2e0b" dependencies = [ "constgebra", "glam", @@ -2516,15 +2743,6 @@ dependencies = [ "png", ] -[[package]] -name = "immutable-chunkmap" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3e98b1520e49e252237edc238a39869da9f3241f2ec19dc788c1d24694d1e4" -dependencies = [ - "arrayvec", -] - [[package]] name = "indexmap" version = "2.11.4" @@ -2563,6 +2781,15 @@ dependencies = [ "libc", ] +[[package]] +name = "inventory" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc61209c082fbeb19919bee74b176221b27223e27b65d781eb91af24eb1fb46e" +dependencies = [ + "rustversion", +] + [[package]] name = "io-kit-sys" version = "0.4.1" @@ -2631,7 +2858,7 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom 0.3.4", + "getrandom", "libc", ] @@ -2664,11 +2891,11 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "ktx2" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87d65e08a9ec02e409d27a0139eaa6b9756b4d81fe7cde71f6941a83730ce838" +checksum = "ff7f53bdf698e7aa7ec916411bbdc8078135da11b66db5182675b2227f6c0d07" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.4", ] [[package]] @@ -2701,7 +2928,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ "cfg-if", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -2808,13 +3035,13 @@ dependencies = [ [[package]] name = "metal" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" +checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" dependencies = [ "bitflags 2.9.4", "block", - "core-graphics-types", + "core-graphics-types 0.2.0", "foreign-types", "log", "objc", @@ -2849,43 +3076,44 @@ dependencies = [ [[package]] name = "naga" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e380993072e52eef724eddfcde0ed013b0c023c3f0417336ed041aa9f076994e" +checksum = "916cbc7cb27db60be930a4e2da243cf4bc39569195f22fd8ee419cd31d5b662c" dependencies = [ "arrayvec", - "bit-set 0.8.0", + "bit-set", "bitflags 2.9.4", + "cfg-if", "cfg_aliases", "codespan-reporting", + "half", + "hashbrown 0.15.5", "hexf-parse", "indexmap", + "libm", "log", + "num-traits", + "once_cell", "pp-rs", "rustc-hash 1.1.0", "spirv", - "strum", - "termcolor", "thiserror 2.0.17", - "unicode-xid", + "unicode-ident", ] [[package]] name = "naga_oil" -version = "0.17.1" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2464f7395decfd16bb4c33fb0cb3b2c645cc60d051bc7fb652d3720bfb20f18" +checksum = "1b586d3cf5c9b7e13fe2af6e114406ff70773fd80881960378933b63e76f37dd" dependencies = [ - "bit-set 0.5.3", "codespan-reporting", "data-encoding", "indexmap", "naga", - "once_cell", "regex", - "regex-syntax", "rustc-hash 1.1.0", - "thiserror 1.0.69", + "thiserror 2.0.17", "tracing", "unicode-ident", ] @@ -3057,6 +3285,15 @@ dependencies = [ "objc2-encode", ] +[[package]] +name = "objc2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +dependencies = [ + "objc2-encode", +] + [[package]] name = "objc2-app-kit" version = "0.2.2" @@ -3064,13 +3301,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ "bitflags 2.9.4", - "block2", + "block2 0.5.1", + "libc", + "objc2 0.5.2", + "objc2-core-data 0.2.2", + "objc2-core-image 0.2.2", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.9.4", + "block2 0.6.2", "libc", - "objc2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation", - "objc2-quartz-core", + "objc2 0.6.3", + "objc2-cloud-kit 0.3.2", + "objc2-core-data 0.3.2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image 0.3.2", + "objc2-core-text", + "objc2-core-video", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", ] [[package]] @@ -3080,10 +3338,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ "bitflags 2.9.4", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-core-location", - "objc2-foundation", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-foundation 0.3.2", ] [[package]] @@ -3092,9 +3361,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" dependencies = [ - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -3104,9 +3373,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.9.4", - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-foundation 0.3.2", ] [[package]] @@ -3116,6 +3396,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.9.4", + "dispatch2", + "objc2 0.6.3", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.9.4", + "dispatch2", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-io-surface", ] [[package]] @@ -3124,22 +3419,57 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "objc2-metal", ] +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2 0.6.3", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-core-location" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" dependencies = [ - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-contacts", - "objc2-foundation", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[package]] +name = "objc2-core-video" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-io-surface", ] [[package]] @@ -3155,10 +3485,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ "bitflags 2.9.4", - "block2", + "block2 0.5.1", "dispatch", "libc", - "objc2", + "objc2 0.5.2", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +dependencies = [ + "libc", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-core-foundation", ] [[package]] @@ -3167,10 +3529,10 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" dependencies = [ - "block2", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -3180,9 +3542,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.9.4", - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -3192,20 +3554,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.9.4", - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "objc2-metal", ] +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-symbols" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" dependencies = [ - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -3215,15 +3588,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ "bitflags 2.9.4", - "block2", - "objc2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-cloud-kit 0.2.2", + "objc2-core-data 0.2.2", + "objc2-core-image 0.2.2", "objc2-core-location", - "objc2-foundation", + "objc2-foundation 0.2.2", "objc2-link-presentation", - "objc2-quartz-core", + "objc2-quartz-core 0.2.2", "objc2-symbols", "objc2-uniform-type-identifiers", "objc2-user-notifications", @@ -3235,9 +3608,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" dependencies = [ - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -3247,10 +3620,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ "bitflags 2.9.4", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-core-location", - "objc2-foundation", + "objc2-foundation 0.2.2", ] [[package]] @@ -3325,6 +3698,15 @@ dependencies = [ "num-traits", ] +[[package]] +name = "owned_ttf_parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" +dependencies = [ + "ttf-parser 0.25.1", +] + [[package]] name = "parking" version = "2.2.1" @@ -3351,7 +3733,7 @@ dependencies = [ "libc", "redox_syscall 0.5.18", "smallvec", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -3368,11 +3750,12 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "petgraph" -version = "0.7.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", + "hashbrown 0.15.5", "indexmap", "serde", "serde_derive", @@ -3487,16 +3870,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn", -] - [[package]] name = "proc-macro-crate" version = "3.4.0" @@ -3530,6 +3903,15 @@ dependencies = [ "num-traits", ] +[[package]] +name = "quick-xml" +version = "0.37.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.41" @@ -3553,20 +3935,19 @@ checksum = "019b4b213425016d7d84a153c4c73afb0946fbb4840e4eece7ba8848b9d6da22" [[package]] name = "rand" -version = "0.8.5" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ - "libc", "rand_chacha", "rand_core", ] [[package]] name = "rand_chacha" -version = "0.3.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", "rand_core", @@ -3574,18 +3955,18 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.4" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.2.16", + "getrandom", ] [[package]] name = "rand_distr" -version = "0.4.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" dependencies = [ "num-traits", "rand", @@ -3683,6 +4064,9 @@ name = "renderer" version = "0.1.0" dependencies = [ "bevy", + "objc2 0.6.3", + "objc2-app-kit 0.3.2", + "raw-window-handle", "thiserror 2.0.17", "tracing", "tracing-subscriber", @@ -3700,14 +4084,15 @@ dependencies = [ [[package]] name = "ron" -version = "0.8.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" +checksum = "beceb6f7bf81c73e73aeef6dd1356d9a1b2b4909e1f0fc3e59b034f9572d7b7f" dependencies = [ - "base64 0.21.7", + "base64", "bitflags 2.9.4", "serde", "serde_derive", + "unicode-ident", ] [[package]] @@ -3801,11 +4186,30 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia", +] [[package]] name = "self_cell" @@ -3923,6 +4327,31 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.9.4", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.44", + "thiserror 1.0.69", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + [[package]] name = "smol_str" version = "0.2.2" @@ -3934,9 +4363,9 @@ dependencies = [ [[package]] name = "spin" -version = "0.9.8" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" dependencies = [ "portable-atomic", ] @@ -3969,32 +4398,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "strum" -version = "0.26.3" +name = "strict-num" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros", -] +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" [[package]] -name = "strum_macros" -version = "0.26.4" +name = "strsim" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn", -] +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "svg_fmt" @@ -4035,15 +4448,16 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.34.2" +version = "0.37.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b93974b3d3aeaa036504b8eefd4c039dced109171c1ae973f1dc63b2c7e4b2" +checksum = "16607d5caffd1c07ce073528f9ed972d88db15dd44023fa57142963be3feb11f" dependencies = [ "libc", "memchr", "ntapi", "objc2-core-foundation", - "windows 0.57.0", + "objc2-io-kit", + "windows 0.61.3", ] [[package]] @@ -4065,7 +4479,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom", "once_cell", "rustix 1.1.2", "windows-sys 0.61.2", @@ -4129,6 +4543,31 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + [[package]] name = "tinyvec" version = "1.10.0" @@ -4260,15 +4699,12 @@ dependencies = [ [[package]] name = "tracing-oslog" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528bdd1f0e27b5dd9a4ededf154e824b0532731e4af73bb531de46276e0aab1e" +checksum = "d76902d2a8d5f9f55a81155c08971734071968c90f2d9bfe645fe700579b2950" dependencies = [ - "bindgen 0.70.1", "cc", "cfg-if", - "once_cell", - "parking_lot", "tracing-core", "tracing-subscriber", ] @@ -4314,6 +4750,12 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" + [[package]] name = "twox-hash" version = "2.1.2" @@ -4404,7 +4846,7 @@ version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ - "getrandom 0.3.4", + "getrandom", "js-sys", "serde", "wasm-bindgen", @@ -4449,12 +4891,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - [[package]] name = "wasip2" version = "1.0.1+wasi-0.2.4" @@ -4536,6 +4972,114 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wayland-backend" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" +dependencies = [ + "cc", + "downcast-rs 1.2.1", + "rustix 1.1.2", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" +dependencies = [ + "bitflags 2.9.4", + "rustix 1.1.2", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.9.4", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447ccc440a881271b19e9989f75726d60faa09b95b0200a9b7eb5cc47c3eeb29" +dependencies = [ + "rustix 1.1.2", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" +dependencies = [ + "bitflags 2.9.4", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a07a14257c077ab3279987c4f8bb987851bf57081b93710381daea94f2c2c032" +dependencies = [ + "bitflags 2.9.4", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd94963ed43cf9938a090ca4f7da58eb55325ec8200c3848963e98dc25b78ec" +dependencies = [ + "bitflags 2.9.4", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" +dependencies = [ + "dlib", + "log", + "pkg-config", +] + [[package]] name = "web-sys" version = "0.3.81" @@ -4558,24 +5102,25 @@ dependencies = [ [[package]] name = "wgpu" -version = "24.0.5" +version = "26.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b0b3436f0729f6cdf2e6e9201f3d39dc95813fad61d826c1ed07918b4539353" +checksum = "70b6ff82bbf6e9206828e1a3178e851f8c20f1c9028e74dd3a8090741ccd5798" dependencies = [ "arrayvec", "bitflags 2.9.4", + "cfg-if", "cfg_aliases", "document-features", + "hashbrown 0.15.5", "js-sys", "log", "naga", - "parking_lot", + "portable-atomic", "profiling", "raw-window-handle", "smallvec", "static_assertions", "wasm-bindgen", - "wasm-bindgen-futures", "web-sys", "wgpu-core", "wgpu-hal", @@ -4584,49 +5129,84 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "24.0.5" +version = "26.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f0aa306497a238d169b9dc70659105b4a096859a34894544ca81719242e1499" +checksum = "d5f62f1053bd28c2268f42916f31588f81f64796e2ff91b81293515017ca8bd9" dependencies = [ "arrayvec", - "bit-vec 0.8.0", + "bit-set", + "bit-vec", "bitflags 2.9.4", "cfg_aliases", "document-features", + "hashbrown 0.15.5", "indexmap", "log", "naga", "once_cell", "parking_lot", + "portable-atomic", "profiling", "raw-window-handle", "rustc-hash 1.1.0", "smallvec", "thiserror 2.0.17", + "wgpu-core-deps-apple", + "wgpu-core-deps-wasm", + "wgpu-core-deps-windows-linux-android", "wgpu-hal", "wgpu-types", ] +[[package]] +name = "wgpu-core-deps-apple" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18ae5fbde6a4cbebae38358aa73fcd6e0f15c6144b67ef5dc91ded0db125dbdf" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-wasm" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03b9f9e1a50686d315fc6debe4980cc45cd37b0e919351917df494e8fdc8885" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "720a5cb9d12b3d337c15ff0e24d3e97ed11490ff3f7506e7f3d98c68fa5d6f14" +dependencies = [ + "wgpu-hal", +] + [[package]] name = "wgpu-hal" -version = "24.0.4" +version = "26.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f112f464674ca69f3533248508ee30cb84c67cf06c25ff6800685f5e0294e259" +checksum = "7df2c64ac282a91ad7662c90bc4a77d4a2135bc0b2a2da5a4d4e267afc034b9e" dependencies = [ "android_system_properties", "arrayvec", "ash", - "bit-set 0.8.0", + "bit-set", "bitflags 2.9.4", "block", "bytemuck", + "cfg-if", "cfg_aliases", - "core-graphics-types", + "core-graphics-types 0.2.0", "glow", "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", + "hashbrown 0.15.5", "js-sys", "khronos-egl", "libc", @@ -4634,16 +5214,16 @@ dependencies = [ "log", "metal", "naga", - "ndk-sys 0.5.0+25.2.9519653", + "ndk-sys 0.6.0+11769913", "objc", - "once_cell", "ordered-float", "parking_lot", + "portable-atomic", + "portable-atomic-util", "profiling", "range-alloc", "raw-window-handle", "renderdoc-sys", - "rustc-hash 1.1.0", "smallvec", "thiserror 2.0.17", "wasm-bindgen", @@ -4655,14 +5235,16 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50ac044c0e76c03a0378e7786ac505d010a873665e2d51383dcff8dd227dc69c" +checksum = "eca7a8d8af57c18f57d393601a1fb159ace8b2328f1b6b5f80893f7d672c9ae2" dependencies = [ "bitflags 2.9.4", + "bytemuck", "js-sys", "log", "serde", + "thiserror 2.0.17", "web-sys", ] @@ -4709,22 +5291,25 @@ dependencies = [ [[package]] name = "windows" -version = "0.57.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ - "windows-core 0.57.0", + "windows-core 0.58.0", "windows-targets 0.52.6", ] [[package]] name = "windows" -version = "0.58.0" +version = "0.61.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", + "windows-collections 0.2.0", + "windows-core 0.61.2", + "windows-future 0.2.1", + "windows-link 0.1.3", + "windows-numerics 0.2.0", ] [[package]] @@ -4733,39 +5318,36 @@ version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" dependencies = [ - "windows-collections", + "windows-collections 0.3.2", "windows-core 0.62.2", - "windows-future", - "windows-numerics", + "windows-future 0.3.2", + "windows-numerics 0.3.1", ] [[package]] name = "windows-collections" -version = "0.3.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" dependencies = [ - "windows-core 0.62.2", + "windows-core 0.61.2", ] [[package]] -name = "windows-core" -version = "0.54.0" +name = "windows-collections" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ - "windows-result 0.1.2", - "windows-targets 0.52.6", + "windows-core 0.62.2", ] [[package]] name = "windows-core" -version = "0.57.0" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ - "windows-implement 0.57.0", - "windows-interface 0.57.0", "windows-result 0.1.2", "windows-targets 0.52.6", ] @@ -4783,6 +5365,19 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement 0.60.2", + "windows-interface 0.59.3", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + [[package]] name = "windows-core" version = "0.62.2" @@ -4791,31 +5386,31 @@ checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement 0.60.2", "windows-interface 0.59.3", - "windows-link", + "windows-link 0.2.1", "windows-result 0.4.1", "windows-strings 0.5.1", ] [[package]] name = "windows-future" -version = "0.3.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ - "windows-core 0.62.2", - "windows-link", - "windows-threading", + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading 0.1.0", ] [[package]] -name = "windows-implement" -version = "0.57.0" +name = "windows-future" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" dependencies = [ - "proc-macro2", - "quote", - "syn", + "windows-core 0.62.2", + "windows-link 0.2.1", + "windows-threading 0.2.1", ] [[package]] @@ -4840,17 +5435,6 @@ dependencies = [ "syn", ] -[[package]] -name = "windows-interface" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "windows-interface" version = "0.58.0" @@ -4873,12 +5457,28 @@ dependencies = [ "syn", ] +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + [[package]] name = "windows-numerics" version = "0.3.1" @@ -4886,7 +5486,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" dependencies = [ "windows-core 0.62.2", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -4907,13 +5507,22 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + [[package]] name = "windows-result" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -4926,13 +5535,22 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + [[package]] name = "windows-strings" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -4977,7 +5595,7 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -5017,7 +5635,7 @@ version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link", + "windows-link 0.2.1", "windows_aarch64_gnullvm 0.53.1", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", @@ -5028,13 +5646,22 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + [[package]] name = "windows-threading" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -5181,10 +5808,11 @@ version = "0.30.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" dependencies = [ + "ahash", "android-activity", "atomic-waker", "bitflags 2.9.4", - "block2", + "block2 0.5.1", "bytemuck", "calloop", "cfg_aliases", @@ -5195,10 +5823,11 @@ dependencies = [ "dpi", "js-sys", "libc", + "memmap2", "ndk 0.9.0", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "objc2-ui-kit", "orbclient", "percent-encoding", @@ -5206,11 +5835,17 @@ dependencies = [ "raw-window-handle", "redox_syscall 0.4.1", "rustix 0.38.44", + "sctk-adwaita", + "smithay-client-toolkit", "smol_str", "tracing", "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", "web-sys", "web-time", "windows-sys 0.52.0", @@ -5266,6 +5901,12 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" +[[package]] +name = "xcursor" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" + [[package]] name = "xkbcommon-dl" version = "0.4.2" diff --git a/libProcessing/ffi/src/error.rs b/libProcessing/ffi/src/error.rs index 0de41a3a2..1f235580e 100644 --- a/libProcessing/ffi/src/error.rs +++ b/libProcessing/ffi/src/error.rs @@ -1,6 +1,7 @@ -use std::cell::RefCell; -use std::ffi::{c_char, CString}; use renderer::error::ProcessingError; +use std::cell::RefCell; +use std::ffi::{CString, c_char}; +use std::panic; thread_local! { static LAST_ERROR: RefCell> = RefCell::new(None); @@ -34,16 +35,28 @@ pub fn clear_error() { }); } - /// Check the result of an operation, setting the last error if there was one. -pub fn check(result: Result) -> Option { - match result { - Ok(value) => { - Some(value) - } +pub fn check(f: F) -> Option +where + F: FnOnce() -> Result + panic::UnwindSafe, +{ + // we'll catch panics here to prevent unwinding across the FFI boundary + panic::catch_unwind(|| match f() { + Ok(value) => Some(value), Err(err) => { set_error(&err.to_string()); None } - } -} \ No newline at end of file + }) + .unwrap_or_else(|e| { + let msg = if let Some(s) = e.downcast_ref::() { + s.clone() + } else if let Some(s) = e.downcast_ref::<&'static str>() { + s.to_string() + } else { + "Unknown panic payload".to_string() + }; + set_error(&format!("Panic occurred: {}", msg)); + None + }) +} diff --git a/libProcessing/ffi/src/lib.rs b/libProcessing/ffi/src/lib.rs index b24bd1988..4059b404d 100644 --- a/libProcessing/ffi/src/lib.rs +++ b/libProcessing/ffi/src/lib.rs @@ -1,7 +1,66 @@ mod error; +/// Initialize libProcessing. +/// +/// SAFETY: +/// - This is called from the main thread if the platform requires it. +/// - This can only be called once. #[unsafe(no_mangle)] pub extern "C" fn processing_init() { error::clear_error(); - error::check(renderer::init()); -} \ No newline at end of file + error::check(|| renderer::init()); +} + +/// Create a WebGPU surface from a native window handle. +/// Returns a window ID (entity ID) that should be used for subsequent operations. +/// Returns 0 on failure. +/// +/// SAFETY: +/// - Init has been called. +/// - window_handle is a valid GLFW window pointer. +/// - This is called from the same thread as init. +#[unsafe(no_mangle)] +pub extern "C" fn processing_create_surface( + window_handle: u64, + width: u32, + height: u32, + scale_factor: f32, +) -> u64 { + error::clear_error(); + error::check(|| renderer::create_surface(window_handle, width, height, scale_factor)) + .unwrap_or(0) +} + +/// Update window size when resized. +/// +/// SAFETY: +/// - Init and create_surface have been called. +/// - window_id is a valid ID returned from create_surface. +/// - This is called from the same thread as init. +#[unsafe(no_mangle)] +pub extern "C" fn processing_window_resized(window_id: u64, width: u32, height: u32) { + error::clear_error(); + error::check(|| renderer::window_resized(window_id, width, height)); +} + +/// Step the application forward. +/// +/// SAFETY: +/// - Init has been called and exit has not been called. +/// - This is called from the same thread as init. +#[unsafe(no_mangle)] +pub extern "C" fn processing_update() { + error::clear_error(); + error::check(|| renderer::update()); +} + +/// Shuts down internal resources with given exit code, but does *not* terminate the process. +/// +/// SAFETY: +/// - This is called from the same thread as init. +/// - Caller ensures that update is never called again after exit. +#[unsafe(no_mangle)] +pub extern "C" fn processing_exit(exit_code: u8) { + error::clear_error(); + error::check(|| renderer::exit(exit_code)); +} diff --git a/libProcessing/renderer/Cargo.toml b/libProcessing/renderer/Cargo.toml index 7a54e54fa..4dea5a618 100644 --- a/libProcessing/renderer/Cargo.toml +++ b/libProcessing/renderer/Cargo.toml @@ -6,7 +6,12 @@ edition = "2024" [dependencies] tracing = "0.1" tracing-subscriber = "0.3" -bevy = { version = "0.16", no-default-features = true, features = [ +bevy = { version = "0.17", no-default-features = true, features = [ "bevy_render" ] } -thiserror = "2" \ No newline at end of file +thiserror = "2" +raw-window-handle = "0.6" + +[target.'cfg(target_os = "macos")'.dependencies] +objc2 = { version = "0.6", default-features = false } +objc2-app-kit = { version = "0.3", features = ["NSWindow", "NSView"] } \ No newline at end of file diff --git a/libProcessing/renderer/src/error.rs b/libProcessing/renderer/src/error.rs index 93ff93001..aae0092ab 100644 --- a/libProcessing/renderer/src/error.rs +++ b/libProcessing/renderer/src/error.rs @@ -9,4 +9,10 @@ pub enum ProcessingError { AppAccess, #[error("Error initializing tracing: {0}")] Tracing(#[from] tracing::subscriber::SetGlobalDefaultError), + #[error("Window not found")] + WindowNotFound, + #[error("Handle error: {0}")] + HandleError(#[from] raw_window_handle::HandleError), + #[error("Invalid window handle provided")] + InvalidWindowHandle, } \ No newline at end of file diff --git a/libProcessing/renderer/src/lib.rs b/libProcessing/renderer/src/lib.rs index de14da91b..ddbd5729c 100644 --- a/libProcessing/renderer/src/lib.rs +++ b/libProcessing/renderer/src/lib.rs @@ -1,24 +1,186 @@ pub mod error; -// Once-cell for our app use crate::error::Result; -use bevy::app::App; +use bevy::app::{App, AppExit}; use bevy::log::tracing_subscriber; -use std::sync::{Arc, Mutex, OnceLock}; -use tracing::{debug, info}; +use bevy::prelude::*; +use bevy::window::{ + RawHandleWrapper, Window, WindowResolution, WindowWrapper, +}; +use raw_window_handle::{ + DisplayHandle, HandleError, HasDisplayHandle, HasWindowHandle, RawDisplayHandle, + RawWindowHandle, WindowHandle, +}; +use std::cell::RefCell; +use std::num::NonZero; +use std::sync::OnceLock; +use tracing::debug; static IS_INIT: OnceLock<()> = OnceLock::new(); thread_local! { - static APP: OnceLock = OnceLock::default(); + static APP: OnceLock> = OnceLock::default(); +} + +fn app(cb: impl FnOnce(&App) -> Result) -> Result { + let res = APP.with(|app_lock| { + let app = app_lock + .get() + .ok_or_else(|| error::ProcessingError::AppAccess)? + .borrow(); + cb(&app) + })?; + Ok(res) +} + +fn app_mut(cb: impl FnOnce(&mut App) -> Result) -> Result { + let res = APP.with(|app_lock| { + let mut app = app_lock + .get() + .ok_or_else(|| error::ProcessingError::AppAccess)? + .borrow_mut(); + cb(&mut app) + })?; + Ok(res) +} + +struct GlfwWindow { + window_handle: RawWindowHandle, + display_handle: RawDisplayHandle, +} + +// SAFETY: +// - RawWindowHandle and RawDisplayHandle are just pointers +// - The actual window is managed by Java and outlives this struct +// - GLFW is thread-safe-ish, see https://www.glfw.org/faq#29---is-glfw-thread-safe +// +// Note: we enforce that all calls to init/update/exit happen on the main thread, so +// there should be no concurrent access to the window from multiple threads anyway. +unsafe impl Send for GlfwWindow {} +unsafe impl Sync for GlfwWindow {} + +impl HasWindowHandle for GlfwWindow { + fn window_handle(&self) -> core::result::Result, HandleError> { + // SAFETY: + // - Handles passed from Java are valid + Ok(unsafe { WindowHandle::borrow_raw(self.window_handle) }) + } +} + +impl HasDisplayHandle for GlfwWindow { + fn display_handle(&self) -> core::result::Result, HandleError> { + // SAFETY: + // - Handles passed from Java are valid + Ok(unsafe { DisplayHandle::borrow_raw(self.display_handle) }) + } +} + +/// Create a WebGPU surface from a native window handle. +/// +/// Currently, this just creates a bevy window with the given parameters and +/// stores the raw window handle for later use by the renderer, which will +/// actually create the surface. +pub fn create_surface( + window_handle: u64, + width: u32, + height: u32, + scale_factor: f32, +) -> Result { + #[cfg(target_os = "macos")] + let (raw_window_handle, raw_display_handle) = { + use raw_window_handle::{AppKitDisplayHandle, AppKitWindowHandle}; + + // GLFW gives us NSWindow*, but AppKitWindowHandle needs NSView* + // so we have to do some objc magic to grab the right pointer + let ns_view_ptr = { + use objc2::rc::Retained; + use objc2_app_kit::{NSView, NSWindow}; + + // SAFETY: + // - window_handle is a valid NSWindow pointer from the GLFW window + let ns_window = window_handle as *mut NSWindow; + if ns_window.is_null() { + return Err(error::ProcessingError::InvalidWindowHandle); + } + + // SAFETY: + // - The contentView is owned by NSWindow and remains valid as long as the window exists + let ns_window_ref = unsafe { &*ns_window }; + let content_view: Option> = ns_window_ref.contentView(); + + match content_view { + Some(view) => { + let view_ptr = Retained::as_ptr(&view) as *mut std::ffi::c_void; + view_ptr + } + None => { + return Err(error::ProcessingError::InvalidWindowHandle); + } + } + }; + + let window = AppKitWindowHandle::new(std::ptr::NonNull::new(ns_view_ptr).unwrap()); + let display = AppKitDisplayHandle::new(); + ( + RawWindowHandle::AppKit(window), + RawDisplayHandle::AppKit(display), + ) + }; + + #[cfg(target_os = "windows")] + let (raw_window_handle, raw_display_handle) = + { todo!("implemnt windows raw window handle conversion") }; + + #[cfg(target_os = "linux")] + let (raw_window_handle, raw_display_handle) = + { todo!("implement linux raw window handle conversion") }; + + let glfw_window = GlfwWindow { + window_handle: raw_window_handle, + display_handle: raw_display_handle, + }; + + let window_wrapper = WindowWrapper::new(glfw_window); + let handle_wrapper = RawHandleWrapper::new(&window_wrapper)?; + + let entity_id = app_mut(|app| { + let entity = app + .world_mut() + .spawn(( + Window { + resolution: WindowResolution::new(width, height) + .with_scale_factor_override(scale_factor), + ..default() + }, + handle_wrapper, + )) + .id(); + + // TODO: spawn a camera for this window with a render target of this window + + Ok(entity.to_bits()) + })?; + + Ok(entity_id) +} + +/// Update window size when resized. +pub fn window_resized(window_id: u64, width: u32, height: u32) -> Result<()> { + app_mut(|app| { + let entity = Entity::from_bits(window_id); + if let Some(mut window) = app.world_mut().get_mut::(entity) { + window.resolution.set_physical_resolution(width, height); + Ok(()) + } else { + Err(error::ProcessingError::WindowNotFound) + } + }) } /// Initialize the app, if not already initialized. Must be called from the main thread and cannot /// be called concurrently from multiple threads. pub fn init() -> Result<()> { setup_tracing()?; - info!("Initializing libprocessing"); - let is_init = IS_INIT.get().is_some(); let thread_has_app = APP.with(|app_lock| app_lock.get().is_some()); if is_init && !thread_has_app { @@ -34,14 +196,49 @@ pub fn init() -> Result<()> { IS_INIT.get_or_init(|| ()); let mut app = App::new(); - app.add_plugins(bevy::MinimalPlugins); + app.add_plugins( + DefaultPlugins + .build() + .disable::() + .disable::() + .disable::() + .set(WindowPlugin { + primary_window: None, + exit_condition: bevy::window::ExitCondition::DontExit, + ..default() + }), + ); - app + // this does not mean, as one might imagine, that the app is "done", but rather is part + // of bevy's plugin lifecycle prior to "starting" the app. we are manually driving the app + // so we don't need to call `app.run()` + app.finish(); + app.cleanup(); + RefCell::new(app) }); }); Ok(()) } +pub fn update() -> Result<()> { + app_mut(|app| { + app.update(); + Ok(()) + }) +} + +pub fn exit(exit_code: u8) -> Result<()> { + app_mut(|app| { + app.world_mut().write_message(match exit_code { + 0 => AppExit::Success, + _ => AppExit::Error(NonZero::new(exit_code).unwrap()), + }); + + // one final update to process the exit message + app.update(); + Ok(()) + }) +} fn setup_tracing() -> Result<()> { let subscriber = tracing_subscriber::FmtSubscriber::new();