bevy/crates/bevy_tasks/Cargo.toml

30 lines
627 B
TOML
Raw Normal View History

[package]
name = "bevy_tasks"
version = "0.13.0"
edition = "2021"
2020-11-03 21:34:00 +00:00
description = "A task executor for Bevy Engine"
homepage = "https://bevyengine.org"
repository = "https://github.com/bevyengine/bevy"
Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) This relicenses Bevy under the dual MIT or Apache-2.0 license. For rationale, see #2373. * Changes the LICENSE file to describe the dual license. Moved the MIT license to docs/LICENSE-MIT. Added the Apache-2.0 license to docs/LICENSE-APACHE. I opted for this approach over dumping both license files at the root (the more common approach) for a number of reasons: * Github links to the "first" license file (LICENSE-APACHE) in its license links (you can see this in the wgpu and rust-analyzer repos). People clicking these links might erroneously think that the apache license is the only option. Rust and Amethyst both use COPYRIGHT or COPYING files to solve this problem, but this creates more file noise (if you do everything at the root) and the naming feels way less intuitive. * People have a reflex to look for a LICENSE file. By providing a single license file at the root, we make it easy for them to understand our licensing approach. * I like keeping the root clean and noise free * There is precedent for putting the apache and mit license text in sub folders (amethyst) * Removed the `Copyright (c) 2020 Carter Anderson` copyright notice from the MIT license. I don't care about this attribution, it might make license compliance more difficult in some cases, and it didn't properly attribute other contributors. We shoudn't replace it with something like "Copyright (c) 2021 Bevy Contributors" because "Bevy Contributors" is not a legal entity. Instead, we just won't include the copyright line (which has precedent ... Rust also uses this approach). * Updates crates to use the new "MIT OR Apache-2.0" license value * Removes the old legion-transform license file from bevy_transform. bevy_transform has been its own, fully custom implementation for a long time and that license no longer applies. * Added a License section to the main readme * Updated our Bevy Plugin licensing guidelines. As a follow-up we should update the website to properly describe the new license. Closes #2373
2021-07-23 21:11:51 +00:00
license = "MIT OR Apache-2.0"
2020-11-03 21:34:00 +00:00
keywords = ["bevy"]
[features]
multi-threaded = []
[dependencies]
futures-lite = "2.0.1"
async-executor = "1.7.2"
async-channel = "2.1.0"
Update async-io requirement from 1.13.0 to 2.0.0 (#10238) Updates the requirements on [async-io](https://github.com/smol-rs/async-io) to permit the latest version. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/smol-rs/async-io/releases">async-io's releases</a>.</em></p> <blockquote> <h2>v2.0.0</h2> <ul> <li><strong>Breaking:</strong> <code>Async::new()</code> now takes types that implement <code>AsFd</code>/<code>AsSocket</code> instead of <code>AsRawFd</code>/<code>AsRawSocket</code>, in order to implement I/O safety. (<a href="https://redirect.github.com/smol-rs/async-io/issues/142">#142</a>)</li> <li><strong>Breaking:</strong> <code>Async::get_mut()</code>, <code>Async::read_with_mut()</code> and <code>Async::write_with_mut()</code> are now <code>unsafe</code>. The underlying source is technically &quot;borrowed&quot; by the polling instance, so moving it out would be unsound. (<a href="https://redirect.github.com/smol-rs/async-io/issues/142">#142</a>)</li> <li>Expose miscellaneous <code>kqueue</code> filters in the <code>os::kqueue</code> module. (<a href="https://redirect.github.com/smol-rs/async-io/issues/112">#112</a>)</li> <li>Expose a way to get the underlying <code>Poller</code>'s file descriptor on Unix. (<a href="https://redirect.github.com/smol-rs/async-io/issues/125">#125</a>)</li> <li>Add a new <code>Async::new_nonblocking</code> method to allow users to avoid duplicating an already nonblocking socket. (<a href="https://redirect.github.com/smol-rs/async-io/issues/159">#159</a>)</li> <li>Remove the unused <code>fastrand</code> and <code>memchr</code> dependencies. (<a href="https://redirect.github.com/smol-rs/async-io/issues/131">#131</a>)</li> <li>Use <code>tracing</code> instead of <code>log</code>. (<a href="https://redirect.github.com/smol-rs/async-io/issues/140">#140</a>)</li> <li>Support ESP-IDF. (<a href="https://redirect.github.com/smol-rs/async-io/issues/144">#144</a>)</li> <li>Optimize the <code>block_on</code> function to reduce allocation, leading to a slight performance improvement. (<a href="https://redirect.github.com/smol-rs/async-io/issues/149">#149</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/smol-rs/async-io/blob/master/CHANGELOG.md">async-io's changelog</a>.</em></p> <blockquote> <h1>Version 2.0.0</h1> <ul> <li><strong>Breaking:</strong> <code>Async::new()</code> now takes types that implement <code>AsFd</code>/<code>AsSocket</code> instead of <code>AsRawFd</code>/<code>AsRawSocket</code>, in order to implement I/O safety. (<a href="https://redirect.github.com/smol-rs/async-io/issues/142">#142</a>)</li> <li><strong>Breaking:</strong> <code>Async::get_mut()</code>, <code>Async::read_with_mut()</code> and <code>Async::write_with_mut()</code> are now <code>unsafe</code>. The underlying source is technically &quot;borrowed&quot; by the polling instance, so moving it out would be unsound. (<a href="https://redirect.github.com/smol-rs/async-io/issues/142">#142</a>)</li> <li>Expose miscellaneous <code>kqueue</code> filters in the <code>os::kqueue</code> module. (<a href="https://redirect.github.com/smol-rs/async-io/issues/112">#112</a>)</li> <li>Expose a way to get the underlying <code>Poller</code>'s file descriptor on Unix. (<a href="https://redirect.github.com/smol-rs/async-io/issues/125">#125</a>)</li> <li>Add a new <code>Async::new_nonblocking</code> method to allow users to avoid duplicating an already nonblocking socket. (<a href="https://redirect.github.com/smol-rs/async-io/issues/159">#159</a>)</li> <li>Remove the unused <code>fastrand</code> and <code>memchr</code> dependencies. (<a href="https://redirect.github.com/smol-rs/async-io/issues/131">#131</a>)</li> <li>Use <code>tracing</code> instead of <code>log</code>. (<a href="https://redirect.github.com/smol-rs/async-io/issues/140">#140</a>)</li> <li>Support ESP-IDF. (<a href="https://redirect.github.com/smol-rs/async-io/issues/144">#144</a>)</li> <li>Optimize the <code>block_on</code> function to reduce allocation, leading to a slight performance improvement. (<a href="https://redirect.github.com/smol-rs/async-io/issues/149">#149</a>)</li> </ul> <h1>Version 1.13.0</h1> <ul> <li>Use <a href="https://crates.io/crates/rustix/"><code>rustix</code></a> instead of <a href="https://crates.io/crates/libc/"><code>libc</code></a>/<a href="https://crates.io/crates/windows-sys/"><code>windows-sys</code></a> for system calls (<a href="https://redirect.github.com/smol-rs/async-io/issues/76">#76</a>)</li> <li>Add a <code>will_fire</code> method to <code>Timer</code> to test if it will ever fire (<a href="https://redirect.github.com/smol-rs/async-io/issues/106">#106</a>)</li> <li>Reduce syscalls in <code>Async::new</code> (<a href="https://redirect.github.com/smol-rs/async-io/issues/107">#107</a>)</li> <li>Improve the drop ergonomics of <code>Readable</code> and <code>Writable</code> (<a href="https://redirect.github.com/smol-rs/async-io/issues/109">#109</a>)</li> <li>Change the &quot;<code>wepoll</code>&quot; in documentation to &quot;<code>IOCP</code>&quot; (<a href="https://redirect.github.com/smol-rs/async-io/issues/116">#116</a>)</li> </ul> <h1>Version 1.12.0</h1> <ul> <li>Switch from <code>winapi</code> to <code>windows-sys</code> (<a href="https://redirect.github.com/smol-rs/async-io/issues/102">#102</a>)</li> </ul> <h1>Version 1.11.0</h1> <ul> <li>Update <code>concurrent-queue</code> to v2. (<a href="https://redirect.github.com/smol-rs/async-io/issues/99">#99</a>)</li> </ul> <h1>Version 1.10.0</h1> <ul> <li>Remove the dependency on the <code>once_cell</code> crate to restore the MSRV. (<a href="https://redirect.github.com/smol-rs/async-io/issues/95">#95</a>)</li> </ul> <h1>Version 1.9.0</h1> <ul> <li>Fix panic on very large durations. (<a href="https://redirect.github.com/smol-rs/async-io/issues/87">#87</a>)</li> <li>Add <code>Timer::never</code> (<a href="https://redirect.github.com/smol-rs/async-io/issues/87">#87</a>)</li> </ul> <h1>Version 1.8.0</h1> <ul> <li>Implement I/O safety traits on Rust 1.63+ (<a href="https://redirect.github.com/smol-rs/async-io/issues/84">#84</a>)</li> </ul> <h1>Version 1.7.0</h1> <ul> <li>Process timers set for exactly <code>now</code>. (<a href="https://redirect.github.com/smol-rs/async-io/issues/73">#73</a>)</li> </ul> <h1>Version 1.6.0</h1> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/smol-rs/async-io/commit/7e89eec4d15d70215f5a96f7f66a3c0224aa90a5"><code>7e89eec</code></a> v2.0.0</li> <li><a href="https://github.com/smol-rs/async-io/commit/356431754cb3756d1c9f59f29c11c04a7f353ffa"><code>3564317</code></a> tests: Add test for <a href="https://redirect.github.com/smol-rs/async-io/issues/154">#154</a></li> <li><a href="https://github.com/smol-rs/async-io/commit/a5da16f07268c5be34818f18920496ff2fc60da3"><code>a5da16f</code></a> Expose Async::new_nonblocking</li> <li><a href="https://github.com/smol-rs/async-io/commit/0f2af634d8272006e6135d7fd23f3b636908d713"><code>0f2af63</code></a> Avoid needless set_nonblocking calls</li> <li><a href="https://github.com/smol-rs/async-io/commit/62e3454f3807ec6ece80ef3abc8cfdc3a41b58bf"><code>62e3454</code></a> Migrate to Rust 2021 (<a href="https://redirect.github.com/smol-rs/async-io/issues/160">#160</a>)</li> <li><a href="https://github.com/smol-rs/async-io/commit/59ee2ea27c5add95d09947f592149811024d7527"><code>59ee2ea</code></a> Use set_nonblocking in Async::new on Windows (<a href="https://redirect.github.com/smol-rs/async-io/issues/157">#157</a>)</li> <li><a href="https://github.com/smol-rs/async-io/commit/d5bc619021b056f0e334950a22a756e1733e3812"><code>d5bc619</code></a> Remove needless as_fd/as_socket calls (<a href="https://redirect.github.com/smol-rs/async-io/issues/158">#158</a>)</li> <li><a href="https://github.com/smol-rs/async-io/commit/0b5016e567d50f72e8fc404dee91e307235756f9"><code>0b5016e</code></a> m: Replace socket2 calls with rustix</li> <li><a href="https://github.com/smol-rs/async-io/commit/8c3c3bd80bd3aac02534a2166298f84127065c09"><code>8c3c3bd</code></a> m: Optimize block_on by caching Parker and Waker</li> <li><a href="https://github.com/smol-rs/async-io/commit/1b1466a6c17327fcd8b7e9a3ec43ebcff2bcc471"><code>1b1466a</code></a> Update this crate to use the new polling breaking changes (<a href="https://redirect.github.com/smol-rs/async-io/issues/142">#142</a>)</li> <li>Additional commits viewable in <a href="https://github.com/smol-rs/async-io/compare/v1.13.0...v2.0.0">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 23:49:57 +00:00
async-io = { version = "2.0.0", optional = true }
async-task = "4.2.0"
concurrent-queue = "2.0.0"
2020-09-25 22:26:23 +00:00
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4"
[dev-dependencies]
Update winit dependency to 0.29 (#10702) # Objective - Update winit dependency to 0.29 ## Changelog ### KeyCode changes - Removed `ScanCode`, as it was [replaced by KeyCode](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md#0292). - `ReceivedCharacter.char` is now a `SmolStr`, [relevant doc](https://docs.rs/winit/latest/winit/event/struct.KeyEvent.html#structfield.text). - Changed most `KeyCode` values, and added more. KeyCode has changed meaning. With this PR, it refers to physical position on keyboard rather than the printed letter on keyboard keys. In practice this means: - On QWERTY keyboard layouts, nothing changes - On any other keyboard layout, `KeyCode` no longer reflects the label on key. - This is "good". In bevy 0.12, when you used WASD for movement, users with non-QWERTY keyboards couldn't play your game! This was especially bad for non-latin keyboards. Now, WASD represents the physical keys. A French player will press the ZQSD keys, which are near each other, Kyrgyz players will use "Цфыв". - This is "bad" as well. You can't know in advance what the label of the key for input is. Your UI says "press WASD to move", even if in reality, they should be pressing "ZQSD" or "Цфыв". You also no longer can use `KeyCode` for text inputs. In any case, it was a pretty bad API for text input. You should use `ReceivedCharacter` now instead. ### Other changes - Use `web-time` rather than `instant` crate. (https://github.com/rust-windowing/winit/pull/2836) - winit did split `run_return` in `run_onDemand` and `pump_events`, I did the same change in bevy_winit and used `pump_events`. - Removed `return_from_run` from `WinitSettings` as `winit::run` now returns on supported platforms. - I left the example "return_after_run" as I think it's still useful. - This winit change is done partly to allow to create a new window after quitting all windows: https://github.com/emilk/egui/issues/1918 ; this PR doesn't address. - added `width` and `height` properties in the `canvas` from wasm example (https://github.com/bevyengine/bevy/pull/10702#discussion_r1420567168) ## Known regressions (important follow ups?) - Provide an API for reacting when a specific key from current layout was released. - possible solutions: use winit::Key from winit::KeyEvent ; mapping between KeyCode and Key ; or . - We don't receive characters through alt+numpad (e.g. alt + 151 = "ù") anymore ; reproduced on winit example "ime". maybe related to https://github.com/rust-windowing/winit/issues/2945 - (windows) Window content doesn't refresh at all when resizing. By reading https://github.com/rust-windowing/winit/issues/2900 ; I suspect we should just fire a `window.request_redraw();` from `AboutToWait`, and handle actual redrawing within `RedrawRequested`. I'm not sure how to move all that code so I'd appreciate it to be a follow up. - (windows) unreleased winit fix for using set_control_flow in AboutToWait https://github.com/rust-windowing/winit/issues/3215 ; ⚠️ I'm not sure what the implications are, but that feels bad 🤔 ## Follow up I'd like to avoid bloating this PR, here are a few follow up tasks worthy of a separate PR, or new issue to track them once this PR is closed, as they would either complicate reviews, or at risk of being controversial: - remove CanvasParentResizePlugin (https://github.com/bevyengine/bevy/pull/10702#discussion_r1417068856) - avoid mentionning explicitly winit in docs from bevy_window ? - NamedKey integration on bevy_input: https://github.com/rust-windowing/winit/pull/3143 introduced a new NamedKey variant. I implemented it only on the converters but we'd benefit making the same changes to bevy_input. - Add more info in KeyboardInput https://github.com/bevyengine/bevy/pull/10702#pullrequestreview-1748336313 - https://github.com/bevyengine/bevy/pull/9905 added a workaround on a bug allegedly fixed by winit 0.29. We should check if it's still necessary. - update to raw_window_handle 0.6 - blocked by wgpu - Rename `KeyCode` to `PhysicalKeyCode` https://github.com/bevyengine/bevy/pull/10702#discussion_r1404595015 - remove `instant` dependency, [replaced by](https://github.com/rust-windowing/winit/pull/2836) `web_time`), we'd need to update to : - fastrand >= 2.0 - [`async-executor`](https://github.com/smol-rs/async-executor) >= 1.7 - [`futures-lite`](https://github.com/smol-rs/futures-lite) >= 2.0 - Verify license, see [discussion](https://github.com/bevyengine/bevy/pull/8745#discussion_r1402439800) - we might be missing a short notice or description of changes made - Consider using https://github.com/rust-windowing/cursor-icon directly rather than vendoring it in bevy. - investigate [this unwrap](https://github.com/bevyengine/bevy/pull/8745#discussion_r1387044986) (`winit_window.canvas().unwrap();`) - Use more good things about winit's update - https://github.com/bevyengine/bevy/pull/10689#issuecomment-1823560428 ## Migration Guide This PR should have one.
2023-12-21 07:40:47 +00:00
web-time = { version = "0.2" }
[lints]
workspace = true