morse_code: Use TimeProvider and coroutines
This allows for more straightforward implementation logic as well as testing
with simulated time.
Change-Id: Ia79f80dc37340c004f6ddf60503b62c7567defdd
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/showcase/sense/+/234191
Commit-Queue: Taylor Cramer <cramertj@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Reviewed-by: Aaron Green <aarongreen@google.com>
diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock
index ed0f553..807c253 100644
--- a/MODULE.bazel.lock
+++ b/MODULE.bazel.lock
@@ -130,7 +130,8 @@
"https://bcr.bazel.build/modules/rules_proto/5.3.0-21.7/MODULE.bazel": "e8dff86b0971688790ae75528fe1813f71809b5afd57facb44dad9e8eca631b7",
"https://bcr.bazel.build/modules/rules_proto/6.0.0-rc1/MODULE.bazel": "1e5b502e2e1a9e825eef74476a5a1ee524a92297085015a052510b09a1a09483",
"https://bcr.bazel.build/modules/rules_proto/6.0.0/MODULE.bazel": "b531d7f09f58dce456cd61b4579ce8c86b38544da75184eadaf0a7cb7966453f",
- "https://bcr.bazel.build/modules/rules_proto/6.0.0/source.json": "de77e10ff0ab16acbf54e6b46eecd37a99c5b290468ea1aee6e95eb1affdaed7",
+ "https://bcr.bazel.build/modules/rules_proto/6.0.2/MODULE.bazel": "ce916b775a62b90b61888052a416ccdda405212b6aaeb39522f7dc53431a5e73",
+ "https://bcr.bazel.build/modules/rules_proto/6.0.2/source.json": "17a2e195f56cb28d6bbf763e49973d13890487c6945311ed141e196fb660426d",
"https://bcr.bazel.build/modules/rules_python/0.10.2/MODULE.bazel": "cc82bc96f2997baa545ab3ce73f196d040ffb8756fd2d66125a530031cd90e5f",
"https://bcr.bazel.build/modules/rules_python/0.22.1/MODULE.bazel": "26114f0c0b5e93018c0c066d6673f1a2c3737c7e90af95eff30cfee38d0bbac7",
"https://bcr.bazel.build/modules/rules_python/0.23.1/MODULE.bazel": "49ffccf0511cb8414de28321f5fcf2a31312b47c40cc21577144b7447f2bf300",
@@ -141,8 +142,8 @@
"https://bcr.bazel.build/modules/rules_python/0.35.0/MODULE.bazel": "c3657951764cdcdb5a7370d5e885fad5e8c1583320aad18d46f9f110d2c22755",
"https://bcr.bazel.build/modules/rules_python/0.35.0/source.json": "8fd2681b96184fa441f07f7d58462361366c216ce920f6c3e3c42c27e02c3931",
"https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c",
- "https://bcr.bazel.build/modules/rules_rust/0.45.1/MODULE.bazel": "a69d0db3a958fab2c6520961e1b2287afcc8b36690fd31bbc4f6f7391397150d",
- "https://bcr.bazel.build/modules/rules_rust/0.45.1/source.json": "28a181c6bc9d037bd2a8f2875908d821027def05f87af51b79277395c7b50c71",
+ "https://bcr.bazel.build/modules/rules_rust/0.49.3/MODULE.bazel": "7c747ca20606b61fdb3c99c537a97a7cc89ac48482c0f25b3e70787297b0ec46",
+ "https://bcr.bazel.build/modules/rules_rust/0.49.3/source.json": "0f4627d0ed4cd0d5af58f0162f87dcdf38fe4578e5308a3d7dca4c68cb13e323",
"https://bcr.bazel.build/modules/stardoc/0.5.0/MODULE.bazel": "f9f1f46ba8d9c3362648eea571c6f9100680efc44913618811b58cc9c02cd678",
"https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8",
"https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c",
@@ -1006,8 +1007,8 @@
},
"@@rules_rust+//rust:extensions.bzl%rust": {
"general": {
- "bzlTransitiveDigest": "So1vp2/csFMzosEdevcyINDgX+uslQPTKDNngwsnqSA=",
- "usagesDigest": "/J3W/B19cuchexSbGwH4U61qS6dVkIKTAlIHQikRbgg=",
+ "bzlTransitiveDigest": "W/Z5BLLxMi/HDSc9dvTbPeqNFmoj5dnW6N++kK+HD/4=",
+ "usagesDigest": "Lh5CXUFDxr3iMKb5gWbk1YEGyRaCuJb/vltxsigV7rY=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
"envVariables": {},
@@ -1020,9 +1021,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "x86_64-unknown-linux-gnu",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1037,22 +1038,6 @@
"auth_patterns": []
}
},
- "rustfmt_nightly-2024-05-02__aarch64-apple-darwin_tools": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "rustfmt_toolchain_tools_repository",
- "attributes": {
- "version": "nightly",
- "iso_date": "2024-05-02",
- "sha256s": {},
- "urls": [
- "https://static.rust-lang.org/dist/{}.tar.xz"
- ],
- "auth": {},
- "netrc": "",
- "auth_patterns": {},
- "exec_triple": "aarch64-apple-darwin"
- }
- },
"rust_windows_x86_64__wasm32-wasi__stable_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -1062,8 +1047,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1087,8 +1072,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1112,8 +1097,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1128,6 +1113,20 @@
"auth_patterns": []
}
},
+ "rustfmt_nightly-2024-07-25__x86_64-apple-darwin": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "toolchain_repository_proxy",
+ "attributes": {
+ "toolchain": "@rustfmt_nightly-2024-07-25__x86_64-apple-darwin_tools//:rustfmt_toolchain",
+ "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
+ "target_settings": [],
+ "exec_compatible_with": [
+ "@platforms//cpu:x86_64",
+ "@platforms//os:osx"
+ ],
+ "target_compatible_with": []
+ }
+ },
"rust_linux_aarch64__aarch64-unknown-linux-gnu__stable_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -1137,8 +1136,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "aarch64-unknown-linux-gnu",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1167,20 +1166,6 @@
]
}
},
- "rustfmt_nightly-2024-05-02__x86_64-apple-darwin": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "toolchain_repository_proxy",
- "attributes": {
- "toolchain": "@rustfmt_nightly-2024-05-02__x86_64-apple-darwin_tools//:rustfmt_toolchain",
- "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
- "target_settings": [],
- "exec_compatible_with": [
- "@platforms//cpu:x86_64",
- "@platforms//os:osx"
- ],
- "target_compatible_with": []
- }
- },
"rust_windows_aarch64__aarch64-pc-windows-msvc__nightly": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "toolchain_repository_proxy",
@@ -1209,8 +1194,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1225,6 +1210,16 @@
"auth_patterns": []
}
},
+ "rust_analyzer_1.80.0": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "toolchain_repository_proxy",
+ "attributes": {
+ "toolchain": "@rust_analyzer_1.80.0_tools//:rust_analyzer_toolchain",
+ "toolchain_type": "@rules_rust//rust/rust_analyzer:toolchain_type",
+ "exec_compatible_with": [],
+ "target_compatible_with": []
+ }
+ },
"rust_windows_aarch64__aarch64-pc-windows-msvc__stable_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -1234,8 +1229,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "aarch64-pc-windows-msvc",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1264,6 +1259,20 @@
]
}
},
+ "rustfmt_nightly-2024-07-25__aarch64-unknown-linux-gnu": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "toolchain_repository_proxy",
+ "attributes": {
+ "toolchain": "@rustfmt_nightly-2024-07-25__aarch64-unknown-linux-gnu_tools//:rustfmt_toolchain",
+ "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
+ "target_settings": [],
+ "exec_compatible_with": [
+ "@platforms//cpu:aarch64",
+ "@platforms//os:linux"
+ ],
+ "target_compatible_with": []
+ }
+ },
"rust_linux_x86_64__wasm32-unknown-unknown__stable": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "toolchain_repository_proxy",
@@ -1292,8 +1301,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "x86_64-pc-windows-msvc",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1316,9 +1325,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1333,6 +1342,22 @@
"auth_patterns": []
}
},
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-freebsd_tools": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "rustfmt_toolchain_tools_repository",
+ "attributes": {
+ "version": "nightly",
+ "iso_date": "2024-07-25",
+ "sha256s": {},
+ "urls": [
+ "https://static.rust-lang.org/dist/{}.tar.xz"
+ ],
+ "auth": {},
+ "netrc": "",
+ "auth_patterns": {},
+ "exec_triple": "x86_64-unknown-freebsd"
+ }
+ },
"rust_linux_x86_64__wasm32-unknown-unknown__nightly": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "toolchain_repository_proxy",
@@ -1352,20 +1377,6 @@
]
}
},
- "rustfmt_nightly-2024-05-02__aarch64-pc-windows-msvc": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "toolchain_repository_proxy",
- "attributes": {
- "toolchain": "@rustfmt_nightly-2024-05-02__aarch64-pc-windows-msvc_tools//:rustfmt_toolchain",
- "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
- "target_settings": [],
- "exec_compatible_with": [
- "@platforms//cpu:aarch64",
- "@platforms//os:windows"
- ],
- "target_compatible_with": []
- }
- },
"rust_windows_aarch64__wasm32-wasi__nightly": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "toolchain_repository_proxy",
@@ -1450,9 +1461,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "x86_64-pc-windows-msvc",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1467,20 +1478,6 @@
"auth_patterns": []
}
},
- "rustfmt_nightly-2024-05-02__aarch64-unknown-linux-gnu": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "toolchain_repository_proxy",
- "attributes": {
- "toolchain": "@rustfmt_nightly-2024-05-02__aarch64-unknown-linux-gnu_tools//:rustfmt_toolchain",
- "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
- "target_settings": [],
- "exec_compatible_with": [
- "@platforms//cpu:aarch64",
- "@platforms//os:linux"
- ],
- "target_compatible_with": []
- }
- },
"rust_windows_aarch64__wasm32-wasi__stable": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "toolchain_repository_proxy",
@@ -1509,8 +1506,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1552,9 +1549,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "aarch64-apple-darwin",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1569,6 +1566,22 @@
"auth_patterns": []
}
},
+ "rustfmt_nightly-2024-07-25__aarch64-apple-darwin_tools": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "rustfmt_toolchain_tools_repository",
+ "attributes": {
+ "version": "nightly",
+ "iso_date": "2024-07-25",
+ "sha256s": {},
+ "urls": [
+ "https://static.rust-lang.org/dist/{}.tar.xz"
+ ],
+ "auth": {},
+ "netrc": "",
+ "auth_patterns": {},
+ "exec_triple": "aarch64-apple-darwin"
+ }
+ },
"rust_linux_x86_64__wasm32-unknown-unknown__stable_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -1578,8 +1591,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1621,9 +1634,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1646,9 +1659,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1672,8 +1685,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1748,9 +1761,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1792,9 +1805,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1874,9 +1887,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "x86_64-apple-darwin",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1900,8 +1913,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "aarch64-apple-darwin",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1925,8 +1938,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1941,20 +1954,6 @@
"auth_patterns": []
}
},
- "rustfmt_nightly-2024-05-02__x86_64-unknown-freebsd": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "toolchain_repository_proxy",
- "attributes": {
- "toolchain": "@rustfmt_nightly-2024-05-02__x86_64-unknown-freebsd_tools//:rustfmt_toolchain",
- "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
- "target_settings": [],
- "exec_compatible_with": [
- "@platforms//cpu:x86_64",
- "@platforms//os:freebsd"
- ],
- "target_compatible_with": []
- }
- },
"rust_linux_aarch64__aarch64-unknown-linux-gnu__nightly_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -1963,9 +1962,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "aarch64-unknown-linux-gnu",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -1999,6 +1998,22 @@
]
}
},
+ "rustfmt_nightly-2024-07-25__aarch64-pc-windows-msvc_tools": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "rustfmt_toolchain_tools_repository",
+ "attributes": {
+ "version": "nightly",
+ "iso_date": "2024-07-25",
+ "sha256s": {},
+ "urls": [
+ "https://static.rust-lang.org/dist/{}.tar.xz"
+ ],
+ "auth": {},
+ "netrc": "",
+ "auth_patterns": {},
+ "exec_triple": "aarch64-pc-windows-msvc"
+ }
+ },
"rust_windows_aarch64__wasm32-unknown-unknown__stable": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "toolchain_repository_proxy",
@@ -2018,6 +2033,20 @@
]
}
},
+ "rustfmt_nightly-2024-07-25__aarch64-apple-darwin": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "toolchain_repository_proxy",
+ "attributes": {
+ "toolchain": "@rustfmt_nightly-2024-07-25__aarch64-apple-darwin_tools//:rustfmt_toolchain",
+ "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
+ "target_settings": [],
+ "exec_compatible_with": [
+ "@platforms//cpu:aarch64",
+ "@platforms//os:osx"
+ ],
+ "target_compatible_with": []
+ }
+ },
"rust_linux_aarch64": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_set_repository",
@@ -2051,6 +2080,22 @@
]
}
},
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-linux-gnu_tools": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "rustfmt_toolchain_tools_repository",
+ "attributes": {
+ "version": "nightly",
+ "iso_date": "2024-07-25",
+ "sha256s": {},
+ "urls": [
+ "https://static.rust-lang.org/dist/{}.tar.xz"
+ ],
+ "auth": {},
+ "netrc": "",
+ "auth_patterns": {},
+ "exec_triple": "x86_64-unknown-linux-gnu"
+ }
+ },
"rust_darwin_x86_64__wasm32-wasi__nightly": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "toolchain_repository_proxy",
@@ -2078,9 +2123,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "x86_64-unknown-freebsd",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -2114,20 +2159,18 @@
]
}
},
- "rustfmt_nightly-2024-05-02__aarch64-unknown-linux-gnu_tools": {
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-freebsd": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "rustfmt_toolchain_tools_repository",
+ "ruleClassName": "toolchain_repository_proxy",
"attributes": {
- "version": "nightly",
- "iso_date": "2024-05-02",
- "sha256s": {},
- "urls": [
- "https://static.rust-lang.org/dist/{}.tar.xz"
+ "toolchain": "@rustfmt_nightly-2024-07-25__x86_64-unknown-freebsd_tools//:rustfmt_toolchain",
+ "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
+ "target_settings": [],
+ "exec_compatible_with": [
+ "@platforms//cpu:x86_64",
+ "@platforms//os:freebsd"
],
- "auth": {},
- "netrc": "",
- "auth_patterns": {},
- "exec_triple": "aarch64-unknown-linux-gnu"
+ "target_compatible_with": []
}
},
"rust_windows_aarch64__aarch64-pc-windows-msvc__stable": {
@@ -2149,18 +2192,20 @@
]
}
},
- "rustfmt_nightly-2024-05-02__aarch64-apple-darwin": {
+ "rustfmt_nightly-2024-07-25__x86_64-apple-darwin_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "toolchain_repository_proxy",
+ "ruleClassName": "rustfmt_toolchain_tools_repository",
"attributes": {
- "toolchain": "@rustfmt_nightly-2024-05-02__aarch64-apple-darwin_tools//:rustfmt_toolchain",
- "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
- "target_settings": [],
- "exec_compatible_with": [
- "@platforms//cpu:aarch64",
- "@platforms//os:osx"
+ "version": "nightly",
+ "iso_date": "2024-07-25",
+ "sha256s": {},
+ "urls": [
+ "https://static.rust-lang.org/dist/{}.tar.xz"
],
- "target_compatible_with": []
+ "auth": {},
+ "netrc": "",
+ "auth_patterns": {},
+ "exec_triple": "x86_64-apple-darwin"
}
},
"rust_darwin_aarch64__aarch64-apple-darwin__nightly": {
@@ -2190,9 +2235,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -2212,163 +2257,163 @@
"ruleClassName": "toolchain_repository_hub",
"attributes": {
"toolchain_names": [
- "rust_analyzer_1.78.0",
+ "rust_analyzer_1.80.0",
"rust_darwin_aarch64__aarch64-apple-darwin__stable",
"rust_darwin_aarch64__aarch64-apple-darwin__nightly",
"rust_darwin_aarch64__wasm32-unknown-unknown__stable",
"rust_darwin_aarch64__wasm32-unknown-unknown__nightly",
"rust_darwin_aarch64__wasm32-wasi__stable",
"rust_darwin_aarch64__wasm32-wasi__nightly",
- "rustfmt_nightly-2024-05-02__aarch64-apple-darwin",
+ "rustfmt_nightly-2024-07-25__aarch64-apple-darwin",
"rust_windows_aarch64__aarch64-pc-windows-msvc__stable",
"rust_windows_aarch64__aarch64-pc-windows-msvc__nightly",
"rust_windows_aarch64__wasm32-unknown-unknown__stable",
"rust_windows_aarch64__wasm32-unknown-unknown__nightly",
"rust_windows_aarch64__wasm32-wasi__stable",
"rust_windows_aarch64__wasm32-wasi__nightly",
- "rustfmt_nightly-2024-05-02__aarch64-pc-windows-msvc",
+ "rustfmt_nightly-2024-07-25__aarch64-pc-windows-msvc",
"rust_linux_aarch64__aarch64-unknown-linux-gnu__stable",
"rust_linux_aarch64__aarch64-unknown-linux-gnu__nightly",
"rust_linux_aarch64__wasm32-unknown-unknown__stable",
"rust_linux_aarch64__wasm32-unknown-unknown__nightly",
"rust_linux_aarch64__wasm32-wasi__stable",
"rust_linux_aarch64__wasm32-wasi__nightly",
- "rustfmt_nightly-2024-05-02__aarch64-unknown-linux-gnu",
+ "rustfmt_nightly-2024-07-25__aarch64-unknown-linux-gnu",
"rust_darwin_x86_64__x86_64-apple-darwin__stable",
"rust_darwin_x86_64__x86_64-apple-darwin__nightly",
"rust_darwin_x86_64__wasm32-unknown-unknown__stable",
"rust_darwin_x86_64__wasm32-unknown-unknown__nightly",
"rust_darwin_x86_64__wasm32-wasi__stable",
"rust_darwin_x86_64__wasm32-wasi__nightly",
- "rustfmt_nightly-2024-05-02__x86_64-apple-darwin",
+ "rustfmt_nightly-2024-07-25__x86_64-apple-darwin",
"rust_windows_x86_64__x86_64-pc-windows-msvc__stable",
"rust_windows_x86_64__x86_64-pc-windows-msvc__nightly",
"rust_windows_x86_64__wasm32-unknown-unknown__stable",
"rust_windows_x86_64__wasm32-unknown-unknown__nightly",
"rust_windows_x86_64__wasm32-wasi__stable",
"rust_windows_x86_64__wasm32-wasi__nightly",
- "rustfmt_nightly-2024-05-02__x86_64-pc-windows-msvc",
+ "rustfmt_nightly-2024-07-25__x86_64-pc-windows-msvc",
"rust_freebsd_x86_64__x86_64-unknown-freebsd__stable",
"rust_freebsd_x86_64__x86_64-unknown-freebsd__nightly",
"rust_freebsd_x86_64__wasm32-unknown-unknown__stable",
"rust_freebsd_x86_64__wasm32-unknown-unknown__nightly",
"rust_freebsd_x86_64__wasm32-wasi__stable",
"rust_freebsd_x86_64__wasm32-wasi__nightly",
- "rustfmt_nightly-2024-05-02__x86_64-unknown-freebsd",
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-freebsd",
"rust_linux_x86_64__x86_64-unknown-linux-gnu__stable",
"rust_linux_x86_64__x86_64-unknown-linux-gnu__nightly",
"rust_linux_x86_64__wasm32-unknown-unknown__stable",
"rust_linux_x86_64__wasm32-unknown-unknown__nightly",
"rust_linux_x86_64__wasm32-wasi__stable",
"rust_linux_x86_64__wasm32-wasi__nightly",
- "rustfmt_nightly-2024-05-02__x86_64-unknown-linux-gnu"
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-linux-gnu"
],
"toolchain_labels": {
- "rust_analyzer_1.78.0": "@rust_analyzer_1.78.0_tools//:rust_analyzer_toolchain",
+ "rust_analyzer_1.80.0": "@rust_analyzer_1.80.0_tools//:rust_analyzer_toolchain",
"rust_darwin_aarch64__aarch64-apple-darwin__stable": "@rust_darwin_aarch64__aarch64-apple-darwin__stable_tools//:rust_toolchain",
"rust_darwin_aarch64__aarch64-apple-darwin__nightly": "@rust_darwin_aarch64__aarch64-apple-darwin__nightly_tools//:rust_toolchain",
"rust_darwin_aarch64__wasm32-unknown-unknown__stable": "@rust_darwin_aarch64__wasm32-unknown-unknown__stable_tools//:rust_toolchain",
"rust_darwin_aarch64__wasm32-unknown-unknown__nightly": "@rust_darwin_aarch64__wasm32-unknown-unknown__nightly_tools//:rust_toolchain",
"rust_darwin_aarch64__wasm32-wasi__stable": "@rust_darwin_aarch64__wasm32-wasi__stable_tools//:rust_toolchain",
"rust_darwin_aarch64__wasm32-wasi__nightly": "@rust_darwin_aarch64__wasm32-wasi__nightly_tools//:rust_toolchain",
- "rustfmt_nightly-2024-05-02__aarch64-apple-darwin": "@rustfmt_nightly-2024-05-02__aarch64-apple-darwin_tools//:rustfmt_toolchain",
+ "rustfmt_nightly-2024-07-25__aarch64-apple-darwin": "@rustfmt_nightly-2024-07-25__aarch64-apple-darwin_tools//:rustfmt_toolchain",
"rust_windows_aarch64__aarch64-pc-windows-msvc__stable": "@rust_windows_aarch64__aarch64-pc-windows-msvc__stable_tools//:rust_toolchain",
"rust_windows_aarch64__aarch64-pc-windows-msvc__nightly": "@rust_windows_aarch64__aarch64-pc-windows-msvc__nightly_tools//:rust_toolchain",
"rust_windows_aarch64__wasm32-unknown-unknown__stable": "@rust_windows_aarch64__wasm32-unknown-unknown__stable_tools//:rust_toolchain",
"rust_windows_aarch64__wasm32-unknown-unknown__nightly": "@rust_windows_aarch64__wasm32-unknown-unknown__nightly_tools//:rust_toolchain",
"rust_windows_aarch64__wasm32-wasi__stable": "@rust_windows_aarch64__wasm32-wasi__stable_tools//:rust_toolchain",
"rust_windows_aarch64__wasm32-wasi__nightly": "@rust_windows_aarch64__wasm32-wasi__nightly_tools//:rust_toolchain",
- "rustfmt_nightly-2024-05-02__aarch64-pc-windows-msvc": "@rustfmt_nightly-2024-05-02__aarch64-pc-windows-msvc_tools//:rustfmt_toolchain",
+ "rustfmt_nightly-2024-07-25__aarch64-pc-windows-msvc": "@rustfmt_nightly-2024-07-25__aarch64-pc-windows-msvc_tools//:rustfmt_toolchain",
"rust_linux_aarch64__aarch64-unknown-linux-gnu__stable": "@rust_linux_aarch64__aarch64-unknown-linux-gnu__stable_tools//:rust_toolchain",
"rust_linux_aarch64__aarch64-unknown-linux-gnu__nightly": "@rust_linux_aarch64__aarch64-unknown-linux-gnu__nightly_tools//:rust_toolchain",
"rust_linux_aarch64__wasm32-unknown-unknown__stable": "@rust_linux_aarch64__wasm32-unknown-unknown__stable_tools//:rust_toolchain",
"rust_linux_aarch64__wasm32-unknown-unknown__nightly": "@rust_linux_aarch64__wasm32-unknown-unknown__nightly_tools//:rust_toolchain",
"rust_linux_aarch64__wasm32-wasi__stable": "@rust_linux_aarch64__wasm32-wasi__stable_tools//:rust_toolchain",
"rust_linux_aarch64__wasm32-wasi__nightly": "@rust_linux_aarch64__wasm32-wasi__nightly_tools//:rust_toolchain",
- "rustfmt_nightly-2024-05-02__aarch64-unknown-linux-gnu": "@rustfmt_nightly-2024-05-02__aarch64-unknown-linux-gnu_tools//:rustfmt_toolchain",
+ "rustfmt_nightly-2024-07-25__aarch64-unknown-linux-gnu": "@rustfmt_nightly-2024-07-25__aarch64-unknown-linux-gnu_tools//:rustfmt_toolchain",
"rust_darwin_x86_64__x86_64-apple-darwin__stable": "@rust_darwin_x86_64__x86_64-apple-darwin__stable_tools//:rust_toolchain",
"rust_darwin_x86_64__x86_64-apple-darwin__nightly": "@rust_darwin_x86_64__x86_64-apple-darwin__nightly_tools//:rust_toolchain",
"rust_darwin_x86_64__wasm32-unknown-unknown__stable": "@rust_darwin_x86_64__wasm32-unknown-unknown__stable_tools//:rust_toolchain",
"rust_darwin_x86_64__wasm32-unknown-unknown__nightly": "@rust_darwin_x86_64__wasm32-unknown-unknown__nightly_tools//:rust_toolchain",
"rust_darwin_x86_64__wasm32-wasi__stable": "@rust_darwin_x86_64__wasm32-wasi__stable_tools//:rust_toolchain",
"rust_darwin_x86_64__wasm32-wasi__nightly": "@rust_darwin_x86_64__wasm32-wasi__nightly_tools//:rust_toolchain",
- "rustfmt_nightly-2024-05-02__x86_64-apple-darwin": "@rustfmt_nightly-2024-05-02__x86_64-apple-darwin_tools//:rustfmt_toolchain",
+ "rustfmt_nightly-2024-07-25__x86_64-apple-darwin": "@rustfmt_nightly-2024-07-25__x86_64-apple-darwin_tools//:rustfmt_toolchain",
"rust_windows_x86_64__x86_64-pc-windows-msvc__stable": "@rust_windows_x86_64__x86_64-pc-windows-msvc__stable_tools//:rust_toolchain",
"rust_windows_x86_64__x86_64-pc-windows-msvc__nightly": "@rust_windows_x86_64__x86_64-pc-windows-msvc__nightly_tools//:rust_toolchain",
"rust_windows_x86_64__wasm32-unknown-unknown__stable": "@rust_windows_x86_64__wasm32-unknown-unknown__stable_tools//:rust_toolchain",
"rust_windows_x86_64__wasm32-unknown-unknown__nightly": "@rust_windows_x86_64__wasm32-unknown-unknown__nightly_tools//:rust_toolchain",
"rust_windows_x86_64__wasm32-wasi__stable": "@rust_windows_x86_64__wasm32-wasi__stable_tools//:rust_toolchain",
"rust_windows_x86_64__wasm32-wasi__nightly": "@rust_windows_x86_64__wasm32-wasi__nightly_tools//:rust_toolchain",
- "rustfmt_nightly-2024-05-02__x86_64-pc-windows-msvc": "@rustfmt_nightly-2024-05-02__x86_64-pc-windows-msvc_tools//:rustfmt_toolchain",
+ "rustfmt_nightly-2024-07-25__x86_64-pc-windows-msvc": "@rustfmt_nightly-2024-07-25__x86_64-pc-windows-msvc_tools//:rustfmt_toolchain",
"rust_freebsd_x86_64__x86_64-unknown-freebsd__stable": "@rust_freebsd_x86_64__x86_64-unknown-freebsd__stable_tools//:rust_toolchain",
"rust_freebsd_x86_64__x86_64-unknown-freebsd__nightly": "@rust_freebsd_x86_64__x86_64-unknown-freebsd__nightly_tools//:rust_toolchain",
"rust_freebsd_x86_64__wasm32-unknown-unknown__stable": "@rust_freebsd_x86_64__wasm32-unknown-unknown__stable_tools//:rust_toolchain",
"rust_freebsd_x86_64__wasm32-unknown-unknown__nightly": "@rust_freebsd_x86_64__wasm32-unknown-unknown__nightly_tools//:rust_toolchain",
"rust_freebsd_x86_64__wasm32-wasi__stable": "@rust_freebsd_x86_64__wasm32-wasi__stable_tools//:rust_toolchain",
"rust_freebsd_x86_64__wasm32-wasi__nightly": "@rust_freebsd_x86_64__wasm32-wasi__nightly_tools//:rust_toolchain",
- "rustfmt_nightly-2024-05-02__x86_64-unknown-freebsd": "@rustfmt_nightly-2024-05-02__x86_64-unknown-freebsd_tools//:rustfmt_toolchain",
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-freebsd": "@rustfmt_nightly-2024-07-25__x86_64-unknown-freebsd_tools//:rustfmt_toolchain",
"rust_linux_x86_64__x86_64-unknown-linux-gnu__stable": "@rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools//:rust_toolchain",
"rust_linux_x86_64__x86_64-unknown-linux-gnu__nightly": "@rust_linux_x86_64__x86_64-unknown-linux-gnu__nightly_tools//:rust_toolchain",
"rust_linux_x86_64__wasm32-unknown-unknown__stable": "@rust_linux_x86_64__wasm32-unknown-unknown__stable_tools//:rust_toolchain",
"rust_linux_x86_64__wasm32-unknown-unknown__nightly": "@rust_linux_x86_64__wasm32-unknown-unknown__nightly_tools//:rust_toolchain",
"rust_linux_x86_64__wasm32-wasi__stable": "@rust_linux_x86_64__wasm32-wasi__stable_tools//:rust_toolchain",
"rust_linux_x86_64__wasm32-wasi__nightly": "@rust_linux_x86_64__wasm32-wasi__nightly_tools//:rust_toolchain",
- "rustfmt_nightly-2024-05-02__x86_64-unknown-linux-gnu": "@rustfmt_nightly-2024-05-02__x86_64-unknown-linux-gnu_tools//:rustfmt_toolchain"
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-linux-gnu": "@rustfmt_nightly-2024-07-25__x86_64-unknown-linux-gnu_tools//:rustfmt_toolchain"
},
"toolchain_types": {
- "rust_analyzer_1.78.0": "@rules_rust//rust/rust_analyzer:toolchain_type",
+ "rust_analyzer_1.80.0": "@rules_rust//rust/rust_analyzer:toolchain_type",
"rust_darwin_aarch64__aarch64-apple-darwin__stable": "@rules_rust//rust:toolchain",
"rust_darwin_aarch64__aarch64-apple-darwin__nightly": "@rules_rust//rust:toolchain",
"rust_darwin_aarch64__wasm32-unknown-unknown__stable": "@rules_rust//rust:toolchain",
"rust_darwin_aarch64__wasm32-unknown-unknown__nightly": "@rules_rust//rust:toolchain",
"rust_darwin_aarch64__wasm32-wasi__stable": "@rules_rust//rust:toolchain",
"rust_darwin_aarch64__wasm32-wasi__nightly": "@rules_rust//rust:toolchain",
- "rustfmt_nightly-2024-05-02__aarch64-apple-darwin": "@rules_rust//rust/rustfmt:toolchain_type",
+ "rustfmt_nightly-2024-07-25__aarch64-apple-darwin": "@rules_rust//rust/rustfmt:toolchain_type",
"rust_windows_aarch64__aarch64-pc-windows-msvc__stable": "@rules_rust//rust:toolchain",
"rust_windows_aarch64__aarch64-pc-windows-msvc__nightly": "@rules_rust//rust:toolchain",
"rust_windows_aarch64__wasm32-unknown-unknown__stable": "@rules_rust//rust:toolchain",
"rust_windows_aarch64__wasm32-unknown-unknown__nightly": "@rules_rust//rust:toolchain",
"rust_windows_aarch64__wasm32-wasi__stable": "@rules_rust//rust:toolchain",
"rust_windows_aarch64__wasm32-wasi__nightly": "@rules_rust//rust:toolchain",
- "rustfmt_nightly-2024-05-02__aarch64-pc-windows-msvc": "@rules_rust//rust/rustfmt:toolchain_type",
+ "rustfmt_nightly-2024-07-25__aarch64-pc-windows-msvc": "@rules_rust//rust/rustfmt:toolchain_type",
"rust_linux_aarch64__aarch64-unknown-linux-gnu__stable": "@rules_rust//rust:toolchain",
"rust_linux_aarch64__aarch64-unknown-linux-gnu__nightly": "@rules_rust//rust:toolchain",
"rust_linux_aarch64__wasm32-unknown-unknown__stable": "@rules_rust//rust:toolchain",
"rust_linux_aarch64__wasm32-unknown-unknown__nightly": "@rules_rust//rust:toolchain",
"rust_linux_aarch64__wasm32-wasi__stable": "@rules_rust//rust:toolchain",
"rust_linux_aarch64__wasm32-wasi__nightly": "@rules_rust//rust:toolchain",
- "rustfmt_nightly-2024-05-02__aarch64-unknown-linux-gnu": "@rules_rust//rust/rustfmt:toolchain_type",
+ "rustfmt_nightly-2024-07-25__aarch64-unknown-linux-gnu": "@rules_rust//rust/rustfmt:toolchain_type",
"rust_darwin_x86_64__x86_64-apple-darwin__stable": "@rules_rust//rust:toolchain",
"rust_darwin_x86_64__x86_64-apple-darwin__nightly": "@rules_rust//rust:toolchain",
"rust_darwin_x86_64__wasm32-unknown-unknown__stable": "@rules_rust//rust:toolchain",
"rust_darwin_x86_64__wasm32-unknown-unknown__nightly": "@rules_rust//rust:toolchain",
"rust_darwin_x86_64__wasm32-wasi__stable": "@rules_rust//rust:toolchain",
"rust_darwin_x86_64__wasm32-wasi__nightly": "@rules_rust//rust:toolchain",
- "rustfmt_nightly-2024-05-02__x86_64-apple-darwin": "@rules_rust//rust/rustfmt:toolchain_type",
+ "rustfmt_nightly-2024-07-25__x86_64-apple-darwin": "@rules_rust//rust/rustfmt:toolchain_type",
"rust_windows_x86_64__x86_64-pc-windows-msvc__stable": "@rules_rust//rust:toolchain",
"rust_windows_x86_64__x86_64-pc-windows-msvc__nightly": "@rules_rust//rust:toolchain",
"rust_windows_x86_64__wasm32-unknown-unknown__stable": "@rules_rust//rust:toolchain",
"rust_windows_x86_64__wasm32-unknown-unknown__nightly": "@rules_rust//rust:toolchain",
"rust_windows_x86_64__wasm32-wasi__stable": "@rules_rust//rust:toolchain",
"rust_windows_x86_64__wasm32-wasi__nightly": "@rules_rust//rust:toolchain",
- "rustfmt_nightly-2024-05-02__x86_64-pc-windows-msvc": "@rules_rust//rust/rustfmt:toolchain_type",
+ "rustfmt_nightly-2024-07-25__x86_64-pc-windows-msvc": "@rules_rust//rust/rustfmt:toolchain_type",
"rust_freebsd_x86_64__x86_64-unknown-freebsd__stable": "@rules_rust//rust:toolchain",
"rust_freebsd_x86_64__x86_64-unknown-freebsd__nightly": "@rules_rust//rust:toolchain",
"rust_freebsd_x86_64__wasm32-unknown-unknown__stable": "@rules_rust//rust:toolchain",
"rust_freebsd_x86_64__wasm32-unknown-unknown__nightly": "@rules_rust//rust:toolchain",
"rust_freebsd_x86_64__wasm32-wasi__stable": "@rules_rust//rust:toolchain",
"rust_freebsd_x86_64__wasm32-wasi__nightly": "@rules_rust//rust:toolchain",
- "rustfmt_nightly-2024-05-02__x86_64-unknown-freebsd": "@rules_rust//rust/rustfmt:toolchain_type",
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-freebsd": "@rules_rust//rust/rustfmt:toolchain_type",
"rust_linux_x86_64__x86_64-unknown-linux-gnu__stable": "@rules_rust//rust:toolchain",
"rust_linux_x86_64__x86_64-unknown-linux-gnu__nightly": "@rules_rust//rust:toolchain",
"rust_linux_x86_64__wasm32-unknown-unknown__stable": "@rules_rust//rust:toolchain",
"rust_linux_x86_64__wasm32-unknown-unknown__nightly": "@rules_rust//rust:toolchain",
"rust_linux_x86_64__wasm32-wasi__stable": "@rules_rust//rust:toolchain",
"rust_linux_x86_64__wasm32-wasi__nightly": "@rules_rust//rust:toolchain",
- "rustfmt_nightly-2024-05-02__x86_64-unknown-linux-gnu": "@rules_rust//rust/rustfmt:toolchain_type"
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-linux-gnu": "@rules_rust//rust/rustfmt:toolchain_type"
},
"exec_compatible_with": {
- "rust_analyzer_1.78.0": [],
+ "rust_analyzer_1.80.0": [],
"rust_darwin_aarch64__aarch64-apple-darwin__stable": [
"@platforms//cpu:aarch64",
"@platforms//os:osx"
@@ -2393,7 +2438,7 @@
"@platforms//cpu:aarch64",
"@platforms//os:osx"
],
- "rustfmt_nightly-2024-05-02__aarch64-apple-darwin": [
+ "rustfmt_nightly-2024-07-25__aarch64-apple-darwin": [
"@platforms//cpu:aarch64",
"@platforms//os:osx"
],
@@ -2421,7 +2466,7 @@
"@platforms//cpu:aarch64",
"@platforms//os:windows"
],
- "rustfmt_nightly-2024-05-02__aarch64-pc-windows-msvc": [
+ "rustfmt_nightly-2024-07-25__aarch64-pc-windows-msvc": [
"@platforms//cpu:aarch64",
"@platforms//os:windows"
],
@@ -2449,7 +2494,7 @@
"@platforms//cpu:aarch64",
"@platforms//os:linux"
],
- "rustfmt_nightly-2024-05-02__aarch64-unknown-linux-gnu": [
+ "rustfmt_nightly-2024-07-25__aarch64-unknown-linux-gnu": [
"@platforms//cpu:aarch64",
"@platforms//os:linux"
],
@@ -2477,7 +2522,7 @@
"@platforms//cpu:x86_64",
"@platforms//os:osx"
],
- "rustfmt_nightly-2024-05-02__x86_64-apple-darwin": [
+ "rustfmt_nightly-2024-07-25__x86_64-apple-darwin": [
"@platforms//cpu:x86_64",
"@platforms//os:osx"
],
@@ -2505,7 +2550,7 @@
"@platforms//cpu:x86_64",
"@platforms//os:windows"
],
- "rustfmt_nightly-2024-05-02__x86_64-pc-windows-msvc": [
+ "rustfmt_nightly-2024-07-25__x86_64-pc-windows-msvc": [
"@platforms//cpu:x86_64",
"@platforms//os:windows"
],
@@ -2533,7 +2578,7 @@
"@platforms//cpu:x86_64",
"@platforms//os:freebsd"
],
- "rustfmt_nightly-2024-05-02__x86_64-unknown-freebsd": [
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-freebsd": [
"@platforms//cpu:x86_64",
"@platforms//os:freebsd"
],
@@ -2561,13 +2606,13 @@
"@platforms//cpu:x86_64",
"@platforms//os:linux"
],
- "rustfmt_nightly-2024-05-02__x86_64-unknown-linux-gnu": [
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-linux-gnu": [
"@platforms//cpu:x86_64",
"@platforms//os:linux"
]
},
"target_compatible_with": {
- "rust_analyzer_1.78.0": [],
+ "rust_analyzer_1.80.0": [],
"rust_darwin_aarch64__aarch64-apple-darwin__stable": [
"@platforms//cpu:aarch64",
"@platforms//os:osx"
@@ -2592,7 +2637,7 @@
"@platforms//cpu:wasm32",
"@platforms//os:wasi"
],
- "rustfmt_nightly-2024-05-02__aarch64-apple-darwin": [],
+ "rustfmt_nightly-2024-07-25__aarch64-apple-darwin": [],
"rust_windows_aarch64__aarch64-pc-windows-msvc__stable": [
"@platforms//cpu:aarch64",
"@platforms//os:windows"
@@ -2617,7 +2662,7 @@
"@platforms//cpu:wasm32",
"@platforms//os:wasi"
],
- "rustfmt_nightly-2024-05-02__aarch64-pc-windows-msvc": [],
+ "rustfmt_nightly-2024-07-25__aarch64-pc-windows-msvc": [],
"rust_linux_aarch64__aarch64-unknown-linux-gnu__stable": [
"@platforms//cpu:aarch64",
"@platforms//os:linux"
@@ -2642,7 +2687,7 @@
"@platforms//cpu:wasm32",
"@platforms//os:wasi"
],
- "rustfmt_nightly-2024-05-02__aarch64-unknown-linux-gnu": [],
+ "rustfmt_nightly-2024-07-25__aarch64-unknown-linux-gnu": [],
"rust_darwin_x86_64__x86_64-apple-darwin__stable": [
"@platforms//cpu:x86_64",
"@platforms//os:osx"
@@ -2667,7 +2712,7 @@
"@platforms//cpu:wasm32",
"@platforms//os:wasi"
],
- "rustfmt_nightly-2024-05-02__x86_64-apple-darwin": [],
+ "rustfmt_nightly-2024-07-25__x86_64-apple-darwin": [],
"rust_windows_x86_64__x86_64-pc-windows-msvc__stable": [
"@platforms//cpu:x86_64",
"@platforms//os:windows"
@@ -2692,7 +2737,7 @@
"@platforms//cpu:wasm32",
"@platforms//os:wasi"
],
- "rustfmt_nightly-2024-05-02__x86_64-pc-windows-msvc": [],
+ "rustfmt_nightly-2024-07-25__x86_64-pc-windows-msvc": [],
"rust_freebsd_x86_64__x86_64-unknown-freebsd__stable": [
"@platforms//cpu:x86_64",
"@platforms//os:freebsd"
@@ -2717,7 +2762,7 @@
"@platforms//cpu:wasm32",
"@platforms//os:wasi"
],
- "rustfmt_nightly-2024-05-02__x86_64-unknown-freebsd": [],
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-freebsd": [],
"rust_linux_x86_64__x86_64-unknown-linux-gnu__stable": [
"@platforms//cpu:x86_64",
"@platforms//os:linux"
@@ -2742,7 +2787,7 @@
"@platforms//cpu:wasm32",
"@platforms//os:wasi"
],
- "rustfmt_nightly-2024-05-02__x86_64-unknown-linux-gnu": []
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-linux-gnu": []
}
}
},
@@ -2755,8 +2800,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -2780,8 +2825,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "x86_64-apple-darwin",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -2815,6 +2860,21 @@
]
}
},
+ "rust_analyzer_1.80.0_tools": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "rust_analyzer_toolchain_tools_repository",
+ "attributes": {
+ "version": "1.80.0",
+ "iso_date": "",
+ "sha256s": {},
+ "urls": [
+ "https://static.rust-lang.org/dist/{}.tar.xz"
+ ],
+ "auth": {},
+ "netrc": "",
+ "auth_patterns": []
+ }
+ },
"rust_freebsd_x86_64__wasm32-unknown-unknown__stable_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -2824,8 +2884,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -2867,9 +2927,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -2903,6 +2963,20 @@
]
}
},
+ "rustfmt_nightly-2024-07-25__x86_64-pc-windows-msvc": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "toolchain_repository_proxy",
+ "attributes": {
+ "toolchain": "@rustfmt_nightly-2024-07-25__x86_64-pc-windows-msvc_tools//:rustfmt_toolchain",
+ "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
+ "target_settings": [],
+ "exec_compatible_with": [
+ "@platforms//cpu:x86_64",
+ "@platforms//os:windows"
+ ],
+ "target_compatible_with": []
+ }
+ },
"rust_linux_aarch64__wasm32-unknown-unknown__stable": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "toolchain_repository_proxy",
@@ -2922,36 +2996,6 @@
]
}
},
- "rustfmt_nightly-2024-05-02__aarch64-pc-windows-msvc_tools": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "rustfmt_toolchain_tools_repository",
- "attributes": {
- "version": "nightly",
- "iso_date": "2024-05-02",
- "sha256s": {},
- "urls": [
- "https://static.rust-lang.org/dist/{}.tar.xz"
- ],
- "auth": {},
- "netrc": "",
- "auth_patterns": {},
- "exec_triple": "aarch64-pc-windows-msvc"
- }
- },
- "rustfmt_nightly-2024-05-02__x86_64-pc-windows-msvc": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "toolchain_repository_proxy",
- "attributes": {
- "toolchain": "@rustfmt_nightly-2024-05-02__x86_64-pc-windows-msvc_tools//:rustfmt_toolchain",
- "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
- "target_settings": [],
- "exec_compatible_with": [
- "@platforms//cpu:x86_64",
- "@platforms//os:windows"
- ],
- "target_compatible_with": []
- }
- },
"rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -2961,8 +3005,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "x86_64-unknown-linux-gnu",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -2977,21 +3021,6 @@
"auth_patterns": []
}
},
- "rust_analyzer_1.78.0_tools": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "rust_analyzer_toolchain_tools_repository",
- "attributes": {
- "version": "1.78.0",
- "iso_date": "",
- "sha256s": {},
- "urls": [
- "https://static.rust-lang.org/dist/{}.tar.xz"
- ],
- "auth": {},
- "netrc": "",
- "auth_patterns": []
- }
- },
"rust_linux_aarch64__wasm32-wasi__nightly_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -3000,9 +3029,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3025,9 +3054,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3070,8 +3099,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "x86_64-unknown-freebsd",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3132,9 +3161,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3157,9 +3186,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3174,6 +3203,22 @@
"auth_patterns": []
}
},
+ "rustfmt_nightly-2024-07-25__aarch64-unknown-linux-gnu_tools": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "rustfmt_toolchain_tools_repository",
+ "attributes": {
+ "version": "nightly",
+ "iso_date": "2024-07-25",
+ "sha256s": {},
+ "urls": [
+ "https://static.rust-lang.org/dist/{}.tar.xz"
+ ],
+ "auth": {},
+ "netrc": "",
+ "auth_patterns": {},
+ "exec_triple": "aarch64-unknown-linux-gnu"
+ }
+ },
"rust_darwin_x86_64": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_set_repository",
@@ -3196,9 +3241,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3222,8 +3267,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3247,8 +3292,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3315,20 +3360,6 @@
]
}
},
- "rustfmt_nightly-2024-05-02__x86_64-unknown-linux-gnu": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "toolchain_repository_proxy",
- "attributes": {
- "toolchain": "@rustfmt_nightly-2024-05-02__x86_64-unknown-linux-gnu_tools//:rustfmt_toolchain",
- "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
- "target_settings": [],
- "exec_compatible_with": [
- "@platforms//cpu:x86_64",
- "@platforms//os:linux"
- ],
- "target_compatible_with": []
- }
- },
"rust_linux_x86_64__wasm32-wasi__stable_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -3338,8 +3369,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3377,8 +3408,8 @@
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
"iso_date": "",
- "version": "1.78.0",
- "rustfmt_version": "nightly/2024-05-02",
+ "version": "1.80.0",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3412,20 +3443,18 @@
]
}
},
- "rustfmt_nightly-2024-05-02__x86_64-pc-windows-msvc_tools": {
+ "rustfmt_nightly-2024-07-25__aarch64-pc-windows-msvc": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "rustfmt_toolchain_tools_repository",
+ "ruleClassName": "toolchain_repository_proxy",
"attributes": {
- "version": "nightly",
- "iso_date": "2024-05-02",
- "sha256s": {},
- "urls": [
- "https://static.rust-lang.org/dist/{}.tar.xz"
+ "toolchain": "@rustfmt_nightly-2024-07-25__aarch64-pc-windows-msvc_tools//:rustfmt_toolchain",
+ "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
+ "target_settings": [],
+ "exec_compatible_with": [
+ "@platforms//cpu:aarch64",
+ "@platforms//os:windows"
],
- "auth": {},
- "netrc": "",
- "auth_patterns": {},
- "exec_triple": "x86_64-pc-windows-msvc"
+ "target_compatible_with": []
}
},
"rust_linux_x86_64__x86_64-unknown-linux-gnu__nightly": {
@@ -3466,22 +3495,6 @@
]
}
},
- "rustfmt_nightly-2024-05-02__x86_64-unknown-linux-gnu_tools": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "rustfmt_toolchain_tools_repository",
- "attributes": {
- "version": "nightly",
- "iso_date": "2024-05-02",
- "sha256s": {},
- "urls": [
- "https://static.rust-lang.org/dist/{}.tar.xz"
- ],
- "auth": {},
- "netrc": "",
- "auth_patterns": {},
- "exec_triple": "x86_64-unknown-linux-gnu"
- }
- },
"rust_windows_x86_64__wasm32-unknown-unknown__nightly": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "toolchain_repository_proxy",
@@ -3577,6 +3590,22 @@
]
}
},
+ "rustfmt_nightly-2024-07-25__x86_64-pc-windows-msvc_tools": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "rustfmt_toolchain_tools_repository",
+ "attributes": {
+ "version": "nightly",
+ "iso_date": "2024-07-25",
+ "sha256s": {},
+ "urls": [
+ "https://static.rust-lang.org/dist/{}.tar.xz"
+ ],
+ "auth": {},
+ "netrc": "",
+ "auth_patterns": {},
+ "exec_triple": "x86_64-pc-windows-msvc"
+ }
+ },
"rust_windows_aarch64__aarch64-pc-windows-msvc__nightly_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -3585,9 +3614,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "aarch64-pc-windows-msvc",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3602,22 +3631,6 @@
"auth_patterns": []
}
},
- "rustfmt_nightly-2024-05-02__x86_64-apple-darwin_tools": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "rustfmt_toolchain_tools_repository",
- "attributes": {
- "version": "nightly",
- "iso_date": "2024-05-02",
- "sha256s": {},
- "urls": [
- "https://static.rust-lang.org/dist/{}.tar.xz"
- ],
- "auth": {},
- "netrc": "",
- "auth_patterns": {},
- "exec_triple": "x86_64-apple-darwin"
- }
- },
"rust_darwin_aarch64__wasm32-wasi__nightly_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -3626,9 +3639,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-wasi",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
@@ -3643,22 +3656,6 @@
"auth_patterns": []
}
},
- "rustfmt_nightly-2024-05-02__x86_64-unknown-freebsd_tools": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "rustfmt_toolchain_tools_repository",
- "attributes": {
- "version": "nightly",
- "iso_date": "2024-05-02",
- "sha256s": {},
- "urls": [
- "https://static.rust-lang.org/dist/{}.tar.xz"
- ],
- "auth": {},
- "netrc": "",
- "auth_patterns": {},
- "exec_triple": "x86_64-unknown-freebsd"
- }
- },
"rust_freebsd_x86_64__x86_64-unknown-freebsd__stable": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "toolchain_repository_proxy",
@@ -3678,6 +3675,20 @@
]
}
},
+ "rustfmt_nightly-2024-07-25__x86_64-unknown-linux-gnu": {
+ "bzlFile": "@@rules_rust+//rust:repositories.bzl",
+ "ruleClassName": "toolchain_repository_proxy",
+ "attributes": {
+ "toolchain": "@rustfmt_nightly-2024-07-25__x86_64-unknown-linux-gnu_tools//:rustfmt_toolchain",
+ "toolchain_type": "@rules_rust//rust/rustfmt:toolchain_type",
+ "target_settings": [],
+ "exec_compatible_with": [
+ "@platforms//cpu:x86_64",
+ "@platforms//os:linux"
+ ],
+ "target_compatible_with": []
+ }
+ },
"rust_freebsd_x86_64__x86_64-unknown-freebsd__nightly": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "toolchain_repository_proxy",
@@ -3697,16 +3708,6 @@
]
}
},
- "rust_analyzer_1.78.0": {
- "bzlFile": "@@rules_rust+//rust:repositories.bzl",
- "ruleClassName": "toolchain_repository_proxy",
- "attributes": {
- "toolchain": "@rust_analyzer_1.78.0_tools//:rust_analyzer_toolchain",
- "toolchain_type": "@rules_rust//rust/rust_analyzer:toolchain_type",
- "exec_compatible_with": [],
- "target_compatible_with": []
- }
- },
"rust_linux_x86_64__wasm32-unknown-unknown__nightly_tools": {
"bzlFile": "@@rules_rust+//rust:repositories.bzl",
"ruleClassName": "rust_toolchain_tools_repository",
@@ -3715,9 +3716,9 @@
"allocator_library": "@rules_rust//ffi/cc/allocator_library",
"global_allocator_library": "@rules_rust//ffi/cc/global_allocator_library",
"target_triple": "wasm32-unknown-unknown",
- "iso_date": "2024-05-02",
+ "iso_date": "2024-07-25",
"version": "nightly",
- "rustfmt_version": "nightly/2024-05-02",
+ "rustfmt_version": "nightly/2024-07-25",
"edition": "2021",
"dev_components": false,
"extra_rustc_flags": [],
diff --git a/apps/blinky/BUILD.bazel b/apps/blinky/BUILD.bazel
index a727670..b565162 100644
--- a/apps/blinky/BUILD.bazel
+++ b/apps/blinky/BUILD.bazel
@@ -27,7 +27,7 @@
"//modules/board:service",
"//system:worker",
"//system",
- "@pigweed//pw_async2:system_time_provider",
+ "@pigweed//pw_async2:system_time_provider",
"@pigweed//pw_log",
"@pigweed//pw_system:async",
diff --git a/apps/factory/BUILD.bazel b/apps/factory/BUILD.bazel
index 6bd2eb8..69cd41c 100644
--- a/apps/factory/BUILD.bazel
+++ b/apps/factory/BUILD.bazel
@@ -36,7 +36,7 @@
"//system:pubsub",
"//system:worker",
"//system",
- "@pigweed//pw_async2:system_time_provider",
+ "@pigweed//pw_async2:system_time_provider",
"@pigweed//pw_log",
"@pigweed//pw_system:async",
"@pigweed//pw_thread:thread",
diff --git a/apps/factory/main.cc b/apps/factory/main.cc
index b63676a..cfd9703 100644
--- a/apps/factory/main.cc
+++ b/apps/factory/main.cc
@@ -43,7 +43,7 @@
static sense::BlinkyService blinky_service;
blinky_service.Init(pw::System().dispatcher(),
- pw::async2::GetSystemTimeProvider(),
+ pw::async2::GetSystemTimeProvider(),
pw::System().allocator(),
system::MonochromeLed(),
system::PolychromeLed());
diff --git a/apps/production/BUILD.bazel b/apps/production/BUILD.bazel
index 9304a23..580d3bb 100644
--- a/apps/production/BUILD.bazel
+++ b/apps/production/BUILD.bazel
@@ -37,6 +37,7 @@
"//system",
":threads",
"@pigweed//pw_assert:check",
+ "@pigweed//pw_async2:system_time_provider",
"@pigweed//pw_log",
"@pigweed//pw_system:async",
"@pigweed//pw_thread:thread",
diff --git a/apps/production/main.cc b/apps/production/main.cc
index 71f0840..7beca75 100644
--- a/apps/production/main.cc
+++ b/apps/production/main.cc
@@ -25,6 +25,7 @@
#include "modules/state_manager/service.h"
#include "modules/state_manager/state_manager.h"
#include "pw_assert/check.h"
+#include "pw_async2/system_time_provider.h"
#include "pw_log/log.h"
#include "pw_system/system.h"
#include "pw_thread/detached_thread.h"
@@ -58,11 +59,13 @@
void InitMorseEncoder() {
// The morse encoder will emit pubsub events to the state manager.
static Encoder morse_encoder;
- morse_encoder.Init(system::GetWorker(),
- [](bool turn_on, const Encoder::State& state) {
+ morse_encoder.Init(pw::System().dispatcher(),
+ pw::async2::GetSystemTimeProvider(),
+ pw::System().allocator(),
+ [](const Encoder::Output& output) {
std::ignore = system::PubSub().Publish(MorseCodeValue{
- .turn_on = turn_on,
- .message_finished = state.message_finished(),
+ .turn_on = output.on(),
+ .message_finished = output.message_finished(),
});
});
diff --git a/modules/air_sensor/BUILD.bazel b/modules/air_sensor/BUILD.bazel
index 9ef9931..5f23327 100644
--- a/modules/air_sensor/BUILD.bazel
+++ b/modules/air_sensor/BUILD.bazel
@@ -57,7 +57,7 @@
deps = [
":air_sensor",
":air_sensor_fake",
- "@pigweed//pw_sync:timed_thread_notification",
+ "@pigweed//pw_sync:thread_notification",
"@pigweed//pw_thread:test_thread_context",
"@pigweed//pw_thread:thread",
"@pigweed//pw_unit_test",
diff --git a/modules/air_sensor/air_sensor_test.cc b/modules/air_sensor/air_sensor_test.cc
index ab23d9a..de6a7ec 100644
--- a/modules/air_sensor/air_sensor_test.cc
+++ b/modules/air_sensor/air_sensor_test.cc
@@ -15,7 +15,6 @@
#include "modules/air_sensor/air_sensor.h"
#include "modules/air_sensor/air_sensor_fake.h"
-#include "pw_sync/timed_thread_notification.h"
#include "pw_thread/test_thread_context.h"
#include "pw_thread/thread.h"
#include "pw_unit_test/framework.h"
@@ -46,8 +45,8 @@
}
AirSensorFake air_sensor_;
- pw::sync::TimedThreadNotification request_;
- pw::sync::TimedThreadNotification response_;
+ pw::sync::ThreadNotification request_;
+ pw::sync::ThreadNotification response_;
};
// Unit tests.
diff --git a/modules/blinky/blinky.h b/modules/blinky/blinky.h
index f8b86f3..c155753 100644
--- a/modules/blinky/blinky.h
+++ b/modules/blinky/blinky.h
@@ -44,7 +44,7 @@
///
/// This method MUST be called before using any other method.
void Init(pw::async2::Dispatcher& dispatcher,
- pw::async2::TimeProvider<pw::chrono::SystemClock>& time,
+ pw::async2::TimeProvider<pw::chrono::SystemClock>& time,
pw::Allocator& allocator,
MonochromeLed& monochrome_led,
PolychromeLed& polychrome_led);
diff --git a/modules/blinky/blinky_test.cc b/modules/blinky/blinky_test.cc
index 587ae5b..3b9bb9a 100644
--- a/modules/blinky/blinky_test.cc
+++ b/modules/blinky/blinky_test.cc
@@ -41,7 +41,8 @@
std::chrono::milliseconds(kIntervalMs));
BlinkyTest() : monochrome_led_(time_) {
- blinky_.Init(dispatcher_, time_, allocator_, monochrome_led_, polychrome_led_);
+ blinky_.Init(
+ dispatcher_, time_, allocator_, monochrome_led_, polychrome_led_);
}
pw::InlineDeque<Event>::iterator FirstActive() {
diff --git a/modules/blinky/service.cc b/modules/blinky/service.cc
index 2427b04..6837540 100644
--- a/modules/blinky/service.cc
+++ b/modules/blinky/service.cc
@@ -19,11 +19,12 @@
namespace sense {
-void BlinkyService::Init(pw::async2::Dispatcher& dispatcher,
- pw::async2::TimeProvider<pw::chrono::SystemClock>& time,
- pw::Allocator& allocator,
- MonochromeLed& monochrome_led,
- PolychromeLed& polychrome_led) {
+void BlinkyService::Init(
+ pw::async2::Dispatcher& dispatcher,
+ pw::async2::TimeProvider<pw::chrono::SystemClock>& time,
+ pw::Allocator& allocator,
+ MonochromeLed& monochrome_led,
+ PolychromeLed& polychrome_led) {
blinky_.Init(dispatcher, time, allocator, monochrome_led, polychrome_led);
// Start binking once every 1000ms.
PW_CHECK_OK(blinky_.Blink(/*blink_count=*/0, /*interval_ms=*/1000));
diff --git a/modules/blinky/service.h b/modules/blinky/service.h
index 24ba696..8c6240d 100644
--- a/modules/blinky/service.h
+++ b/modules/blinky/service.h
@@ -24,7 +24,7 @@
: public ::blinky::pw_rpc::nanopb::Blinky::Service<BlinkyService> {
public:
void Init(pw::async2::Dispatcher& dispatcher,
- pw::async2::TimeProvider<pw::chrono::SystemClock>& time,
+ pw::async2::TimeProvider<pw::chrono::SystemClock>& time,
pw::Allocator& allocator,
MonochromeLed& monochrome_led,
PolychromeLed& polychrome_led);
diff --git a/modules/buttons/BUILD.bazel b/modules/buttons/BUILD.bazel
index d8c326a..65bf977 100644
--- a/modules/buttons/BUILD.bazel
+++ b/modules/buttons/BUILD.bazel
@@ -44,7 +44,6 @@
"@pigweed//pw_digital_io",
"@pigweed//pw_status",
"@pigweed//pw_sync:timed_thread_notification",
- "@pigweed//pw_thread:sleep",
"@pigweed//pw_unit_test",
],
)
diff --git a/modules/morse_code/BUILD.bazel b/modules/morse_code/BUILD.bazel
index 0ff65b4..f7bdd81 100644
--- a/modules/morse_code/BUILD.bazel
+++ b/modules/morse_code/BUILD.bazel
@@ -33,13 +33,14 @@
deps = [
":nanopb_rpc",
"//modules/worker",
+ "@pigweed//pw_async2:coro",
+ "@pigweed//pw_async2:coro_or_else_task",
+ "@pigweed//pw_async2:dispatcher",
+ "@pigweed//pw_async2:time_provider",
"@pigweed//pw_chrono:system_clock",
- "@pigweed//pw_chrono:system_timer",
+ "@pigweed//pw_containers:flat_map",
"@pigweed//pw_function",
"@pigweed//pw_string",
- "@pigweed//pw_sync:interrupt_spin_lock",
- "@pigweed//pw_sync:lock_annotations",
- "@pigweed//pw_work_queue",
],
)
@@ -50,13 +51,12 @@
":encoder",
"//modules/led:monochrome_led_fake",
"//modules/worker:test_worker",
+ "@pigweed//pw_allocator:testing",
+ "@pigweed//pw_async2:dispatcher",
+ "@pigweed//pw_async2:simulated_time_provider",
"@pigweed//pw_containers:vector",
"@pigweed//pw_function",
"@pigweed//pw_status",
- "@pigweed//pw_sync:timed_thread_notification",
- "@pigweed//pw_thread:sleep",
- "@pigweed//pw_thread:test_thread_context",
- "@pigweed//pw_thread:thread",
"@pigweed//pw_unit_test",
],
)
diff --git a/modules/morse_code/encoder.cc b/modules/morse_code/encoder.cc
index b8e1a79..6ce6f14 100644
--- a/modules/morse_code/encoder.cc
+++ b/modules/morse_code/encoder.cc
@@ -25,12 +25,15 @@
namespace sense {
-Encoder::Encoder() : timer_(pw::bind_member<&Encoder::ToggleLed>(this)) {}
+Encoder::~Encoder() { encode_task_.Deregister(); }
-Encoder::~Encoder() { timer_.Cancel(); }
-
-void Encoder::Init(Worker& worker, OutputFunction&& output) {
- worker_ = &worker;
+void Encoder::Init(pw::async2::Dispatcher& dispatcher,
+ pw::async2::TimeProvider<pw::chrono::SystemClock>& time,
+ pw::Allocator& allocator,
+ OutputFunction&& output) {
+ dispatcher_ = &dispatcher;
+ time_ = &time;
+ allocator_ = &allocator;
output_ = std::move(output);
}
@@ -44,101 +47,77 @@
PW_LOG_INFO(
"Encoding message %u times at a %ums interval", repeat, interval_ms);
}
+
pw::chrono::SystemClock::duration interval =
pw::chrono::SystemClock::for_at_least(
std::chrono::milliseconds(interval_ms));
- timer_.Cancel();
- {
- std::lock_guard lock(lock_);
- is_on_ = false;
- state_.msg_ = msg;
- state_.msg_offset_ = 0;
- state_.repeat_ = repeat;
- interval_ = interval;
- output_(false, state_);
+ encode_task_.Deregister();
+ pw::async2::CoroContext coro_cx(*allocator_);
+ pw::async2::Coro<pw::Status> coro =
+ EncodeLoop(coro_cx, msg, repeat, interval);
+ if (!coro.IsValid()) {
+ PW_LOG_ERROR("Failed to allocate morse encoder coroutine.");
+ return pw::Status::ResourceExhausted();
}
- worker_->RunOnce([this]() { ScheduleUpdate(); });
+ encode_task_.SetCoro(std::move(coro));
+ dispatcher_->Post(encode_task_);
return pw::OkStatus();
}
-bool Encoder::IsIdle() const {
- std::lock_guard lock(lock_);
- return state_.repeat_ == 0 && state_.msg_offset_ == state_.msg_.size() &&
- state_.num_bits_ == 0;
-}
+bool Encoder::IsIdle() const { return !encode_task_.IsRegistered(); }
-void Encoder::ScheduleUpdate() {
- pw::chrono::SystemClock::duration interval(0);
- bool want_on = false;
- while (true) {
- std::lock_guard lock(lock_);
- if (state_.num_bits_ == 0 && !EnqueueNextLocked()) {
- return;
- }
- want_on = (state_.bits_ % 2) != 0;
- if (want_on != is_on_) {
- break;
- }
- state_.bits_ >>= 1;
- --state_.num_bits_;
- interval += interval_;
+pw::async2::Coro<pw::Status> Encoder::EncodeLoop(
+ pw::async2::CoroContext&,
+ pw::InlineString<kMaxMsgLen> msg,
+ uint32_t repeat,
+ pw::chrono::SystemClock::duration interval) {
+ if (msg.size() == 0 || msg[0] == '\0') {
+ co_return pw::OkStatus();
}
-
- timer_.InvokeAfter(interval);
-}
-
-bool Encoder::EnqueueNextLocked() {
- state_.bits_ = 0;
- state_.num_bits_ = 0;
- char c;
-
- // Try to get the next character, repeating the message as requested and
- // merging consecutive whitespace characters.
- bool needs_word_break = false;
- while (true) {
- if (state_.msg_offset_ == state_.msg_.size()) {
- if (--state_.repeat_ == 0) {
- return false;
+ for (; repeat > 0; --repeat) {
+ for (uint32_t msg_offset = 0; msg_offset < msg.size(); ++msg_offset) {
+ char c = msg[msg_offset];
+ if (c == '\0') {
+ break;
}
- needs_word_break = true;
- state_.msg_offset_ = 0;
- }
- c = state_.msg_[state_.msg_offset_++];
- if (c == '\0') {
- state_.msg_offset_ = state_.msg_.size();
- continue;
- }
- if (!isspace(c)) {
- break;
- }
- needs_word_break = true;
- }
- if (needs_word_break) {
- // Words are separated by 7 dits worth of blanks.
- // The previous symbol ended with 3 blanks, so add 4 more.
- state_.num_bits_ += 4;
- }
+ if (isspace(c)) {
+ // Merge consecutive whitespace characters.
+ bool prev_was_space = msg_offset != 0 && isspace(msg[msg_offset - 1]);
+ if (prev_was_space) {
+ continue;
+ }
- // Encode the character.
- auto it = internal::kEncodings.find(toupper(c));
- if (it == internal::kEncodings.end()) {
- it = internal::kEncodings.find('?');
- }
- const internal::Encoding& encoding = it->second;
- state_.bits_ |= encoding.bits << state_.num_bits_;
- state_.num_bits_ += encoding.num_bits;
- return state_.num_bits_ != 0;
-}
+ // Words are separated by 7 dits worth of blanks.
+ // The previous symbol ended with 3 blanks, so add 4 more.
+ co_await time_->WaitFor(interval * 4);
+ continue;
+ }
-void Encoder::ToggleLed(pw::chrono::SystemClock::time_point) {
- {
- std::lock_guard lock(lock_);
- is_on_ = !is_on_;
- output_(is_on_, state_);
+ // Encode the character.
+ const auto& encoding = ForChar(c);
+ uint32_t remaining_bits = encoding.bits;
+ bool is_on = false;
+ for (uint8_t num_bits = encoding.num_bits; num_bits > 0; --num_bits) {
+ bool on = (remaining_bits % 2) != 0;
+ remaining_bits >>= 1;
+ if (on != is_on) {
+ Output output;
+ output.on_ = on;
+ output.message_finished_ = false;
+ output_(output);
+ is_on = on;
+ }
+ co_await time_->WaitFor(interval);
+ }
+ }
+ Output output;
+ output.on_ = false;
+ output.message_finished_ = true;
+ output_(output);
}
- worker_->RunOnce([this]() { ScheduleUpdate(); });
+ co_return pw::OkStatus();
}
} // namespace sense
diff --git a/modules/morse_code/encoder.h b/modules/morse_code/encoder.h
index a3f6f14..3f4b14f 100644
--- a/modules/morse_code/encoder.h
+++ b/modules/morse_code/encoder.h
@@ -19,13 +19,14 @@
#include "modules/morse_code/morse_code.rpc.pb.h"
#include "modules/worker/worker.h"
+#include "pw_async2/coro.h"
+#include "pw_async2/coro_or_else_task.h"
+#include "pw_async2/dispatcher.h"
+#include "pw_async2/time_provider.h"
#include "pw_chrono/system_clock.h"
-#include "pw_chrono/system_timer.h"
#include "pw_containers/flat_map.h"
#include "pw_status/status.h"
#include "pw_string/string.h"
-#include "pw_sync/interrupt_spin_lock.h"
-#include "pw_sync/lock_annotations.h"
namespace sense {
namespace internal {
@@ -89,41 +90,51 @@
pw::chrono::SystemClock::for_at_least(
std::chrono::milliseconds(kDefaultIntervalMs));
- /// State of the encoder. Passed to each `OutputFunction` call.
- class State {
+ static constexpr const internal::Encoding& ForChar(char c) {
+ auto it = internal::kEncodings.find(toupper(c));
+ if (it == internal::kEncodings.end()) {
+ it = internal::kEncodings.find('?');
+ }
+ return it->second;
+ }
+
+ /// Output of the encoder. Passed to each `OutputFunction` call.
+ class Output {
public:
- State(const State&) = delete;
- State& operator=(const State&) = delete;
+ /// Whether or not the LED is on.
+ constexpr bool on() const { return on_; }
/// True if this is the last LED toggle of the encoded phrase. If the
/// encoder is repeating, this is true at the end of each repeated
/// message.
- [[nodiscard]] bool message_finished() const {
- return msg_offset_ == msg_.size() && num_bits_ == 1;
- };
+ constexpr bool message_finished() const { return message_finished_; };
private:
friend class Encoder;
-
- constexpr State() = default;
-
- pw::InlineString<kMaxMsgLen> msg_;
- size_t msg_offset_ = 0;
- size_t repeat_ = 1;
- uint32_t bits_ = 0;
- size_t num_bits_ = 0;
+ bool on_;
+ bool message_finished_;
};
- using OutputFunction = pw::Function<void(bool turn_on, const State& status)>;
+ using OutputFunction = pw::Function<void(const Output& output)>;
- Encoder();
+ Encoder()
+ : encode_task_(pw::async2::Coro<pw::Status>::Empty(), [](pw::Status) {
+ PW_LOG_ERROR("Failed to allocate morse encode coroutine.");
+ }) {}
~Encoder();
/// Injects this object's dependencies.
///
/// This method MUST be called before using any other method.
- void Init(Worker& worker, OutputFunction&& output);
+ ///
+ /// All reference arguments (the dispatcher, timer, and allocator) are
+ /// stored and used throughout the lifetime of the ``Encoder``, and
+ /// therefore the objects they reference must outlive this ``Encoder``.
+ void Init(pw::async2::Dispatcher& dispatcher,
+ pw::async2::TimeProvider<pw::chrono::SystemClock>& time,
+ pw::Allocator& allocator,
+ OutputFunction&& output);
/// Queues a sequence of callbacks to emit the given message in Morse code.
///
@@ -139,36 +150,24 @@
/// @param interval_ms Duration of a "dit" in milliseconds.
pw::Status Encode(std::string_view request,
uint32_t repeat,
- uint32_t interval_ms) PW_LOCKS_EXCLUDED(lock_);
+ uint32_t interval_ms = kDefaultIntervalMs);
/// Returns whether this instance is currently emitting a message or not.
- bool IsIdle() const PW_LOCKS_EXCLUDED(lock_);
+ bool IsIdle() const;
private:
- /// Adds a toggle callback to the work queue.
- void ScheduleUpdate() PW_LOCKS_EXCLUDED(lock_);
+ pw::async2::Coro<pw::Status> EncodeLoop(
+ pw::async2::CoroContext&,
+ pw::InlineString<kMaxMsgLen> msg,
+ uint32_t repeat,
+ pw::chrono::SystemClock::duration interval);
- /// Encodes the next character into a sequence of LED toggles.
- ///
- /// Returns whether more toggles remain, or if the message is done.
- bool EnqueueNextLocked() PW_EXCLUSIVE_LOCKS_REQUIRED(lock_);
-
- /// Callback for toggling the LED.
- void ToggleLed(pw::chrono::SystemClock::time_point);
-
- /// Emits an "off" to all configured outputs.
- void TurnOff();
-
- Worker* worker_ = nullptr;
- pw::chrono::SystemTimer timer_;
+ pw::async2::Dispatcher* dispatcher_ = nullptr;
+ pw::async2::TimeProvider<pw::chrono::SystemClock>* time_ = nullptr;
+ pw::Allocator* allocator_ = nullptr;
OutputFunction output_;
- mutable pw::sync::InterruptSpinLock lock_;
-
- State state_ PW_GUARDED_BY(lock_);
- pw::chrono::SystemClock::duration interval_ PW_GUARDED_BY(lock_) =
- kDefaultInterval;
- bool is_on_ PW_GUARDED_BY(lock_) = false;
+ pw::async2::CoroOrElseTask encode_task_;
};
} // namespace sense
diff --git a/modules/morse_code/encoder_test.cc b/modules/morse_code/encoder_test.cc
index c005226..d15695d 100644
--- a/modules/morse_code/encoder_test.cc
+++ b/modules/morse_code/encoder_test.cc
@@ -18,16 +18,16 @@
#include <cstdint>
#include "modules/led/monochrome_led_fake.h"
-#include "modules/worker/test_worker.h"
+#include "pw_allocator/testing.h"
+#include "pw_async2/simulated_time_provider.h"
#include "pw_containers/vector.h"
#include "pw_status/status.h"
-#include "pw_sync/timed_thread_notification.h"
-#include "pw_thread/sleep.h"
-#include "pw_thread/thread.h"
#include "pw_unit_test/framework.h"
namespace sense {
+using AllocatorForTest = ::pw::allocator::test::AllocatorForTest<1024>;
+
// Test fixtures.
class MorseCodeEncoderTest : public ::testing::Test {
@@ -37,13 +37,15 @@
static constexpr uint32_t kIntervalMs = 10;
- // TODO(b/352327457): Ideally this would use simulated time, but no
- // simulated system timer exists yet. For now, relax the constraint by
- // checking that the LED was in the right state for _at least_ the expected
- // number of intervals. On some platforms, the fake LED is implemented using
- // threads, and may sleep a bit longer.
- MorseCodeEncoderTest()
- : clock_(pw::chrono::VirtualSystemClock::RealClock()) {}
+ auto LedOutput() {
+ return [this](const Encoder::Output& output) {
+ FakeLedOutput(output.on(), output.message_finished());
+ };
+ }
+
+ MorseCodeEncoderTest() : led_(time_) {
+ encoder_.Init(dispatcher_, time_, allocator_, LedOutput());
+ }
void Expect(std::string_view msg) {
EXPECT_EQ(end_of_pattern_count_, expected_messages_);
@@ -104,7 +106,7 @@
break;
}
- // Check that the LED turns on after the roght amount of time, implying
+ // Check that the LED turns on after the right amount of time, implying
/// it was off.
ASSERT_NE(event, events.end());
EXPECT_EQ(event->state, State::kActive);
@@ -124,16 +126,11 @@
auto interval = pw::chrono::SystemClock::for_at_least(
std::chrono::milliseconds(interval_ms_));
while (!encoder_.IsIdle()) {
- pw::this_thread::sleep_for(interval);
+ dispatcher_.RunUntilStalled().IgnorePoll();
+ time_.AdvanceTime(interval);
}
}
- auto LedOutput() {
- return [this](bool turn_on, const Encoder::State& state) {
- FakeLedOutput(turn_on, state.message_finished());
- };
- }
-
Encoder encoder_;
uint32_t interval_ms_ = kIntervalMs;
@@ -159,7 +156,9 @@
}
}
- pw::chrono::VirtualSystemClock& clock_;
+ pw::async2::Dispatcher dispatcher_;
+ pw::async2::SimulatedTimeProvider<pw::chrono::SystemClock> time_;
+ AllocatorForTest allocator_;
MonochromeLedFake led_;
int end_of_pattern_count_ = 0;
};
@@ -167,39 +166,27 @@
// Unit tests.
TEST_F(MorseCodeEncoderTest, EncodeEmpty) {
- TestWorker<> worker;
- encoder_.Init(worker, LedOutput());
expected_messages_ = 0;
EXPECT_EQ(encoder_.Encode("", 1, interval_ms_), pw::OkStatus());
SleepUntilDone();
- worker.Stop();
Expect("");
}
TEST_F(MorseCodeEncoderTest, EncodeOneLetter) {
- TestWorker<> worker;
- encoder_.Init(worker, LedOutput());
EXPECT_EQ(encoder_.Encode("E", 1, interval_ms_), pw::OkStatus());
SleepUntilDone();
- worker.Stop();
Expect(".");
}
TEST_F(MorseCodeEncoderTest, EncodeOneWord) {
- TestWorker<> worker;
- encoder_.Init(worker, LedOutput());
EXPECT_EQ(encoder_.Encode("PARIS", 1, interval_ms_), pw::OkStatus());
SleepUntilDone();
- worker.Stop();
Expect(".--. .- .-. .. ...");
}
TEST_F(MorseCodeEncoderTest, EncodeHelloWorld) {
- TestWorker<> worker;
- encoder_.Init(worker, LedOutput());
EXPECT_EQ(encoder_.Encode("hello world", 1, interval_ms_), pw::OkStatus());
SleepUntilDone();
- worker.Stop();
Expect(".... . .-.. .-.. --- .-- --- .-. .-.. -..");
}
@@ -209,37 +196,26 @@
#if defined(AM_MORSE_CODE_ENCODER_TEST_FULL) && AM_MORSE_CODE_ENCODER_TEST_FULL
TEST_F(MorseCodeEncoderTest, EncodeRepeated) {
- TestWorker<> worker;
- encoder_.Init(worker, LedOutput());
expected_messages_ = 2;
EXPECT_EQ(encoder_.Encode("hello", 2, interval_ms_), pw::OkStatus());
SleepUntilDone();
- worker.Stop();
Expect(".... . .-.. .-.. --- .... . .-.. .-.. ---");
}
TEST_F(MorseCodeEncoderTest, EncodeSlow) {
- TestWorker<> worker;
- encoder_.Init(worker, LedOutput());
interval_ms_ = 25;
EXPECT_EQ(encoder_.Encode("hello", 1, interval_ms_), pw::OkStatus());
SleepUntilDone();
- worker.Stop();
Expect(".... . .-.. .-.. ---");
}
TEST_F(MorseCodeEncoderTest, EncodeConsecutiveWhitespace) {
- TestWorker<> worker;
- encoder_.Init(worker, LedOutput());
EXPECT_EQ(encoder_.Encode("hello world", 1, interval_ms_), pw::OkStatus());
SleepUntilDone();
- worker.Stop();
Expect(".... . .-.. .-.. --- .-- --- .-. .-.. -..");
}
TEST_F(MorseCodeEncoderTest, EncodeInvalidChars) {
- TestWorker<> worker;
- encoder_.Init(worker, LedOutput());
char s[2];
s[1] = 0;
@@ -255,7 +231,6 @@
SleepUntilDone();
Expect("..--..");
}
- worker.Stop();
}
#endif // AM_MORSE_CODE_ENCODER_TEST_FULL
diff --git a/modules/morse_code/service.cc b/modules/morse_code/service.cc
index 40059da..8cab100 100644
--- a/modules/morse_code/service.cc
+++ b/modules/morse_code/service.cc
@@ -16,8 +16,12 @@
namespace sense {
-void MorseCodeService::Init(Worker& worker, Encoder::OutputFunction&& output) {
- encoder_.Init(worker, std::move(output));
+void MorseCodeService::Init(
+ pw::async2::Dispatcher& dispatcher,
+ pw::async2::TimeProvider<pw::chrono::SystemClock>& time,
+ pw::Allocator& allocator,
+ Encoder::OutputFunction&& output) {
+ encoder_.Init(dispatcher, time, allocator, std::move(output));
}
pw::Status MorseCodeService::Send(const morse_code_SendRequest& request,
diff --git a/modules/morse_code/service.h b/modules/morse_code/service.h
index cac3425..6f34d58 100644
--- a/modules/morse_code/service.h
+++ b/modules/morse_code/service.h
@@ -26,7 +26,10 @@
public:
static constexpr uint32_t kDefaultDitInterval = 10;
- void Init(Worker& worker, Encoder::OutputFunction&& output);
+ void Init(pw::async2::Dispatcher& dispatcher,
+ pw::async2::TimeProvider<pw::chrono::SystemClock>& time,
+ pw::Allocator& allocator,
+ Encoder::OutputFunction&& output);
pw::Status Send(const morse_code_SendRequest& request,
pw_protobuf_Empty& response);
diff --git a/modules/pubsub/BUILD.bazel b/modules/pubsub/BUILD.bazel
index c887735..cc6d0d6 100644
--- a/modules/pubsub/BUILD.bazel
+++ b/modules/pubsub/BUILD.bazel
@@ -91,7 +91,6 @@
"//modules/worker:test_worker",
"@pigweed//pw_rpc:test_helpers",
"@pigweed//pw_rpc/nanopb:client_server_testing",
- "@pigweed//pw_sync:timed_thread_notification",
],
)
diff --git a/modules/pubsub/service_test.cc b/modules/pubsub/service_test.cc
index 051822c..3bb92a3 100644
--- a/modules/pubsub/service_test.cc
+++ b/modules/pubsub/service_test.cc
@@ -18,7 +18,6 @@
#include "modules/worker/test_worker.h"
#include "pw_rpc/nanopb/test_method_context.h"
#include "pw_rpc/test_helpers.h"
-#include "pw_sync/timed_thread_notification.h"
#include "pw_unit_test/framework.h"
namespace {
diff --git a/modules/state_manager/BUILD.bazel b/modules/state_manager/BUILD.bazel
index 96d48d8..c60ec4b 100644
--- a/modules/state_manager/BUILD.bazel
+++ b/modules/state_manager/BUILD.bazel
@@ -32,7 +32,6 @@
"@pigweed//pw_chrono:system_clock",
"@pigweed//pw_log",
"@pigweed//pw_string:format",
- "@pigweed//pw_thread:sleep",
],
deps = [
":common_base_union",
@@ -108,6 +107,5 @@
"//modules/worker:test_worker",
"@pigweed//pw_chrono:system_clock",
"@pigweed//pw_sync:thread_notification",
- "@pigweed//pw_thread:sleep",
],
)
diff --git a/modules/state_manager/state_manager.cc b/modules/state_manager/state_manager.cc
index 6372ab9..21a10c7 100644
--- a/modules/state_manager/state_manager.cc
+++ b/modules/state_manager/state_manager.cc
@@ -25,7 +25,6 @@
#include "pw_chrono/system_clock.h"
#include "pw_log/log.h"
#include "pw_string/format.h"
-#include "pw_thread/sleep.h"
namespace sense {
diff --git a/modules/state_manager/state_manager_test.cc b/modules/state_manager/state_manager_test.cc
index a76cf19..32c1996 100644
--- a/modules/state_manager/state_manager_test.cc
+++ b/modules/state_manager/state_manager_test.cc
@@ -21,7 +21,6 @@
#include "modules/pubsub/pubsub_events.h"
#include "modules/worker/test_worker.h"
#include "pw_chrono/system_clock.h"
-#include "pw_thread/sleep.h"
#include "pw_unit_test/framework.h"
namespace sense {