siderust-js 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/.github/workflows/ci.yml +166 -0
  2. package/.gitmodules +9 -0
  3. package/CHANGELOG.md +26 -0
  4. package/LICENSE +661 -0
  5. package/README.md +138 -0
  6. package/package.json +12 -0
  7. package/qtty-js/.github/workflows/ci.yml +151 -0
  8. package/qtty-js/.gitmodules +3 -0
  9. package/qtty-js/CHANGELOG.md +31 -0
  10. package/qtty-js/LICENSE +661 -0
  11. package/qtty-js/README.md +132 -0
  12. package/qtty-js/package.json +20 -0
  13. package/qtty-js/qtty/.github/workflows/ci.yml +155 -0
  14. package/qtty-js/qtty/CHANGELOG.md +120 -0
  15. package/qtty-js/qtty/Cargo.lock +1462 -0
  16. package/qtty-js/qtty/Cargo.toml +12 -0
  17. package/qtty-js/qtty/LICENSE +661 -0
  18. package/qtty-js/qtty/README.md +9 -0
  19. package/qtty-js/qtty/qtty/Cargo.toml +41 -0
  20. package/qtty-js/qtty/qtty/README.md +8 -0
  21. package/qtty-js/qtty/qtty/examples/angles.rs +14 -0
  22. package/qtty-js/qtty/qtty/examples/astronomy.rs +17 -0
  23. package/qtty-js/qtty/qtty/examples/dimensional_arithmetic.rs +83 -0
  24. package/qtty-js/qtty/qtty/examples/python_integration.rs +61 -0
  25. package/qtty-js/qtty/qtty/examples/quickstart.rs +15 -0
  26. package/qtty-js/qtty/qtty/examples/ratios.rs +12 -0
  27. package/qtty-js/qtty/qtty/examples/serde_with_unit.rs +234 -0
  28. package/qtty-js/qtty/qtty/examples/serialization.rs +141 -0
  29. package/qtty-js/qtty/qtty/examples/serialization_advanced.rs +155 -0
  30. package/qtty-js/qtty/qtty/src/f32.rs +108 -0
  31. package/qtty-js/qtty/qtty/src/f64.rs +30 -0
  32. package/qtty-js/qtty/qtty/src/i128.rs +111 -0
  33. package/qtty-js/qtty/qtty/src/i16.rs +111 -0
  34. package/qtty-js/qtty/qtty/src/i32.rs +111 -0
  35. package/qtty-js/qtty/qtty/src/i64.rs +111 -0
  36. package/qtty-js/qtty/qtty/src/i8.rs +111 -0
  37. package/qtty-js/qtty/qtty/src/lib.rs +238 -0
  38. package/qtty-js/qtty/qtty/tests/fixtures/qtty-vec-no-std/Cargo.lock +83 -0
  39. package/qtty-js/qtty/qtty/tests/fixtures/qtty-vec-no-std/Cargo.toml +10 -0
  40. package/qtty-js/qtty/qtty/tests/fixtures/qtty-vec-no-std/src/lib.rs +7 -0
  41. package/qtty-js/qtty/qtty/tests/fixtures/qtty-vec-no-std-alloc/Cargo.lock +83 -0
  42. package/qtty-js/qtty/qtty/tests/fixtures/qtty-vec-no-std-alloc/Cargo.toml +10 -0
  43. package/qtty-js/qtty/qtty/tests/fixtures/qtty-vec-no-std-alloc/src/lib.rs +7 -0
  44. package/qtty-js/qtty/qtty/tests/fixtures/qtty-vec-std/Cargo.lock +83 -0
  45. package/qtty-js/qtty/qtty/tests/fixtures/qtty-vec-std/Cargo.toml +10 -0
  46. package/qtty-js/qtty/qtty/tests/fixtures/qtty-vec-std/src/lib.rs +5 -0
  47. package/qtty-js/qtty/qtty/tests/integration_tests.rs +529 -0
  48. package/qtty-js/qtty/qtty/tests/qtty_vec_feature_matrix.rs +58 -0
  49. package/qtty-js/qtty/qtty-core/Cargo.toml +41 -0
  50. package/qtty-js/qtty/qtty-core/README.md +8 -0
  51. package/qtty-js/qtty/qtty-core/examples/diesel_integration.rs +145 -0
  52. package/qtty-js/qtty/qtty-core/examples/quantity_db_serde.rs +215 -0
  53. package/qtty-js/qtty/qtty-core/src/dimension.rs +249 -0
  54. package/qtty-js/qtty/qtty-core/src/feature_diesel.rs +318 -0
  55. package/qtty-js/qtty/qtty-core/src/feature_pyo3.rs +27 -0
  56. package/qtty-js/qtty/qtty-core/src/feature_serde.rs +203 -0
  57. package/qtty-js/qtty/qtty-core/src/feature_tiberius.rs +28 -0
  58. package/qtty-js/qtty/qtty-core/src/lib.rs +744 -0
  59. package/qtty-js/qtty/qtty-core/src/macros.rs +93 -0
  60. package/qtty-js/qtty/qtty-core/src/quantity.rs +810 -0
  61. package/qtty-js/qtty/qtty-core/src/scalar.rs +1742 -0
  62. package/qtty-js/qtty/qtty-core/src/unit.rs +332 -0
  63. package/qtty-js/qtty/qtty-core/src/units/angular.rs +1228 -0
  64. package/qtty-js/qtty/qtty-core/src/units/area.rs +243 -0
  65. package/qtty-js/qtty/qtty-core/src/units/frequency.rs +179 -0
  66. package/qtty-js/qtty/qtty-core/src/units/length.rs +1270 -0
  67. package/qtty-js/qtty/qtty-core/src/units/mass.rs +488 -0
  68. package/qtty-js/qtty/qtty-core/src/units/mod.rs +26 -0
  69. package/qtty-js/qtty/qtty-core/src/units/power.rs +324 -0
  70. package/qtty-js/qtty/qtty-core/src/units/time.rs +667 -0
  71. package/qtty-js/qtty/qtty-core/src/units/unitless.rs +212 -0
  72. package/qtty-js/qtty/qtty-core/src/units/velocity.rs +210 -0
  73. package/qtty-js/qtty/qtty-core/src/units/volume.rs +269 -0
  74. package/qtty-js/qtty/qtty-core/tests/core.rs +628 -0
  75. package/qtty-js/qtty/qtty-core/tests/diesel.rs +461 -0
  76. package/qtty-js/qtty/qtty-core/tests/integers.rs +632 -0
  77. package/qtty-js/qtty/qtty-core/tests/no_cross_unit_ops.rs +35 -0
  78. package/qtty-js/qtty/qtty-core/tests/pyo3.rs +334 -0
  79. package/qtty-js/qtty/qtty-core/tests/quantity_f32.rs +276 -0
  80. package/qtty-js/qtty/qtty-core/tests/scalar_decimal.rs +258 -0
  81. package/qtty-js/qtty/qtty-core/tests/scalar_f32.rs +286 -0
  82. package/qtty-js/qtty/qtty-core/tests/scalar_f64_real.rs +287 -0
  83. package/qtty-js/qtty/qtty-core/tests/scalar_rational.rs +260 -0
  84. package/qtty-js/qtty/qtty-core/tests/serde.rs +256 -0
  85. package/qtty-js/qtty/qtty-core/tests/tiberius.rs +208 -0
  86. package/qtty-js/qtty/qtty-derive/Cargo.toml +23 -0
  87. package/qtty-js/qtty/qtty-derive/README.md +8 -0
  88. package/qtty-js/qtty/qtty-derive/src/lib.rs +340 -0
  89. package/qtty-js/qtty/qtty-ffi/ARCHITECTURE.md +3 -0
  90. package/qtty-js/qtty/qtty-ffi/Cargo.toml +31 -0
  91. package/qtty-js/qtty/qtty-ffi/README.md +9 -0
  92. package/qtty-js/qtty/qtty-ffi/build.rs +326 -0
  93. package/qtty-js/qtty/qtty-ffi/cbindgen.toml +105 -0
  94. package/qtty-js/qtty/qtty-ffi/include/qtty_ffi.h +1126 -0
  95. package/qtty-js/qtty/qtty-ffi/src/ffi.rs +1251 -0
  96. package/qtty-js/qtty/qtty-ffi/src/ffi_serde.rs +294 -0
  97. package/qtty-js/qtty/qtty-ffi/src/helpers.rs +310 -0
  98. package/qtty-js/qtty/qtty-ffi/src/lib.rs +229 -0
  99. package/qtty-js/qtty/qtty-ffi/src/macros.rs +121 -0
  100. package/qtty-js/qtty/qtty-ffi/src/registry.rs +274 -0
  101. package/qtty-js/qtty/qtty-ffi/src/types.rs +620 -0
  102. package/qtty-js/qtty/qtty-ffi/tests/integration_tests.rs +842 -0
  103. package/qtty-js/qtty/qtty-ffi/units.csv +156 -0
  104. package/qtty-js/qtty/qtty-ffi/units.csv.md +3 -0
  105. package/qtty-js/qtty-node/.prettierignore +6 -0
  106. package/qtty-js/qtty-node/.prettierrc.json +6 -0
  107. package/qtty-js/qtty-node/README.md +250 -0
  108. package/qtty-js/qtty-node/c8.config.json +11 -0
  109. package/qtty-js/qtty-node/eslint.config.js +31 -0
  110. package/qtty-js/qtty-node/examples/arithmetic.mjs +64 -0
  111. package/qtty-js/qtty-node/examples/astronomy.mjs +90 -0
  112. package/qtty-js/qtty-node/examples/quickstart.mjs +36 -0
  113. package/qtty-js/qtty-node/examples/serialization.mjs +125 -0
  114. package/qtty-js/qtty-node/examples/unit_factories.mjs +74 -0
  115. package/qtty-js/qtty-node/index.d.ts +219 -0
  116. package/qtty-js/qtty-node/index.js +323 -0
  117. package/qtty-js/qtty-node/lib/DerivedQuantity.js +122 -0
  118. package/qtty-js/qtty-node/lib/Quantity.js +151 -0
  119. package/qtty-js/qtty-node/lib/backend.js +25 -0
  120. package/qtty-js/qtty-node/native.cjs +306 -0
  121. package/qtty-js/qtty-node/package-lock.json +3223 -0
  122. package/qtty-js/qtty-node/package.json +70 -0
  123. package/qtty-js/qtty-node/units.d.ts +299 -0
  124. package/qtty-js/qtty-node/units.js +210 -0
  125. package/qtty-js/qtty-web/Cargo.lock +767 -0
  126. package/qtty-js/qtty-web/Cargo.toml +21 -0
  127. package/qtty-js/qtty-web/index.d.ts +140 -0
  128. package/qtty-js/qtty-web/index.js +20 -0
  129. package/qtty-js/qtty-web/lib/DerivedQuantity.js +58 -0
  130. package/qtty-js/qtty-web/lib/Quantity.js +75 -0
  131. package/qtty-js/qtty-web/lib/backend.js +80 -0
  132. package/qtty-js/qtty-web/package.json +45 -0
  133. package/qtty-js/qtty-web/src/lib.rs +111 -0
  134. package/qtty-js/scripts/ci.sh +73 -0
  135. package/scripts/ci.sh +123 -0
  136. package/siderust-core/Cargo.lock +787 -0
  137. package/siderust-core/Cargo.toml +18 -0
  138. package/siderust-core/DEDUPLICATION.md +124 -0
  139. package/siderust-core/src/body.rs +120 -0
  140. package/siderust-core/src/events.rs +184 -0
  141. package/siderust-core/src/lib.rs +20 -0
  142. package/siderust-core/src/observer.rs +55 -0
  143. package/siderust-core/src/position.rs +213 -0
  144. package/siderust-node/.prettierignore +7 -0
  145. package/siderust-node/.prettierrc.json +6 -0
  146. package/siderust-node/Cargo.lock +906 -0
  147. package/siderust-node/Cargo.toml +29 -0
  148. package/siderust-node/README.md +109 -0
  149. package/siderust-node/__test__/index.test.mjs +248 -0
  150. package/siderust-node/build.rs +5 -0
  151. package/siderust-node/c8.config.json +3 -0
  152. package/siderust-node/eslint.config.js +31 -0
  153. package/siderust-node/examples/01_basic_coordinates.mjs +24 -0
  154. package/siderust-node/examples/02_coordinate_transformations.mjs +25 -0
  155. package/siderust-node/examples/03_all_frames_conversions.mjs +26 -0
  156. package/siderust-node/examples/04_all_center_conversions.mjs +24 -0
  157. package/siderust-node/examples/05_target_tracking.mjs +22 -0
  158. package/siderust-node/examples/06_night_events.mjs +18 -0
  159. package/siderust-node/examples/07_moon_properties.mjs +21 -0
  160. package/siderust-node/examples/08_solar_system.mjs +19 -0
  161. package/siderust-node/examples/09_star_observability.mjs +22 -0
  162. package/siderust-node/examples/10_time_periods.mjs +9 -0
  163. package/siderust-node/examples/11_serialization.mjs +31 -0
  164. package/siderust-node/examples/12_runtime_ephemeris.mjs +27 -0
  165. package/siderust-node/examples/13_coordinate_operations.mjs +20 -0
  166. package/siderust-node/index.d.ts +623 -0
  167. package/siderust-node/index.js +79 -0
  168. package/siderust-node/lib/Observer.js +112 -0
  169. package/siderust-node/lib/Star.js +118 -0
  170. package/siderust-node/lib/backend.js +63 -0
  171. package/siderust-node/lib/wrappers.js +566 -0
  172. package/siderust-node/main.js +20 -0
  173. package/siderust-node/native.cjs +360 -0
  174. package/siderust-node/package-lock.json +3261 -0
  175. package/siderust-node/package.json +71 -0
  176. package/siderust-node/src/body.rs +74 -0
  177. package/siderust-node/src/coordinates.rs +372 -0
  178. package/siderust-node/src/ephemeris.rs +462 -0
  179. package/siderust-node/src/events.rs +577 -0
  180. package/siderust-node/src/lib.rs +43 -0
  181. package/siderust-node/src/observer.rs +132 -0
  182. package/siderust-node/src/phase.rs +218 -0
  183. package/siderust-node/src/position.rs +292 -0
  184. package/siderust-node/src/star.rs +200 -0
  185. package/siderust-web/Cargo.lock +855 -0
  186. package/siderust-web/Cargo.toml +34 -0
  187. package/siderust-web/README.md +100 -0
  188. package/siderust-web/__test__/index.test.mjs +118 -0
  189. package/siderust-web/examples/github-pages/README.md +31 -0
  190. package/siderust-web/examples/github-pages/index.html +135 -0
  191. package/siderust-web/index.d.ts +311 -0
  192. package/siderust-web/index.js +66 -0
  193. package/siderust-web/lib/Observer.js +103 -0
  194. package/siderust-web/lib/Star.js +116 -0
  195. package/siderust-web/lib/backend.js +400 -0
  196. package/siderust-web/lib/wrappers.js +512 -0
  197. package/siderust-web/package.json +55 -0
  198. package/siderust-web/src/body.rs +69 -0
  199. package/siderust-web/src/coordinates.rs +302 -0
  200. package/siderust-web/src/ephemeris.rs +456 -0
  201. package/siderust-web/src/events.rs +520 -0
  202. package/siderust-web/src/lib.rs +51 -0
  203. package/siderust-web/src/observer.rs +117 -0
  204. package/siderust-web/src/phase.rs +190 -0
  205. package/siderust-web/src/position.rs +291 -0
  206. package/siderust-web/src/star.rs +178 -0
  207. package/tempoch-js/.github/workflows/ci.yml +142 -0
  208. package/tempoch-js/.gitmodules +3 -0
  209. package/tempoch-js/CHANGELOG.md +25 -0
  210. package/tempoch-js/LICENSE +661 -0
  211. package/tempoch-js/README.md +126 -0
  212. package/tempoch-js/package.json +20 -0
  213. package/tempoch-js/scripts/ci.sh +73 -0
  214. package/tempoch-js/tempoch/.github/workflows/ci.yml +113 -0
  215. package/tempoch-js/tempoch/CHANGELOG.md +82 -0
  216. package/tempoch-js/tempoch/Cargo.lock +947 -0
  217. package/tempoch-js/tempoch/Cargo.toml +3 -0
  218. package/tempoch-js/tempoch/LICENSE +661 -0
  219. package/tempoch-js/tempoch/README.md +76 -0
  220. package/tempoch-js/tempoch/tempoch/Cargo.toml +27 -0
  221. package/tempoch-js/tempoch/tempoch/examples/periods.rs +45 -0
  222. package/tempoch-js/tempoch/tempoch/examples/quickstart.rs +13 -0
  223. package/tempoch-js/tempoch/tempoch/src/lib.rs +49 -0
  224. package/tempoch-js/tempoch/tempoch/tests/integration.rs +57 -0
  225. package/tempoch-js/tempoch/tempoch-core/Cargo.toml +24 -0
  226. package/tempoch-js/tempoch/tempoch-core/src/delta_t.rs +345 -0
  227. package/tempoch-js/tempoch/tempoch-core/src/instant.rs +811 -0
  228. package/tempoch-js/tempoch/tempoch-core/src/julian_date_ext.rs +142 -0
  229. package/tempoch-js/tempoch/tempoch-core/src/lib.rs +81 -0
  230. package/tempoch-js/tempoch/tempoch-core/src/period.rs +1168 -0
  231. package/tempoch-js/tempoch/tempoch-core/src/scales.rs +779 -0
  232. package/tempoch-js/tempoch/tempoch-ffi/Cargo.lock +889 -0
  233. package/tempoch-js/tempoch/tempoch-ffi/Cargo.toml +26 -0
  234. package/tempoch-js/tempoch/tempoch-ffi/build.rs +24 -0
  235. package/tempoch-js/tempoch/tempoch-ffi/cbindgen.toml +30 -0
  236. package/tempoch-js/tempoch/tempoch-ffi/src/error.rs +19 -0
  237. package/tempoch-js/tempoch/tempoch-ffi/src/lib.rs +82 -0
  238. package/tempoch-js/tempoch/tempoch-ffi/src/period.rs +101 -0
  239. package/tempoch-js/tempoch/tempoch-ffi/src/time.rs +711 -0
  240. package/tempoch-js/tempoch/tempoch-ffi/tests/ffi.rs +265 -0
  241. package/tempoch-js/tempoch-node/.prettierignore +6 -0
  242. package/tempoch-js/tempoch-node/.prettierrc.json +6 -0
  243. package/tempoch-js/tempoch-node/Cargo.lock +496 -0
  244. package/tempoch-js/tempoch-node/Cargo.toml +29 -0
  245. package/tempoch-js/tempoch-node/README.md +265 -0
  246. package/tempoch-js/tempoch-node/__test__/index.test.mjs +598 -0
  247. package/tempoch-js/tempoch-node/build.rs +5 -0
  248. package/tempoch-js/tempoch-node/c8.config.json +3 -0
  249. package/tempoch-js/tempoch-node/eslint.config.js +31 -0
  250. package/tempoch-js/tempoch-node/examples/periods.mjs +79 -0
  251. package/tempoch-js/tempoch-node/examples/quickstart.mjs +71 -0
  252. package/tempoch-js/tempoch-node/examples/timescales.mjs +92 -0
  253. package/tempoch-js/tempoch-node/index.d.ts +280 -0
  254. package/tempoch-js/tempoch-node/index.js +32 -0
  255. package/tempoch-js/tempoch-node/lib/JulianDate.js +176 -0
  256. package/tempoch-js/tempoch-node/lib/ModifiedJulianDate.js +156 -0
  257. package/tempoch-js/tempoch-node/lib/Period.js +133 -0
  258. package/tempoch-js/tempoch-node/lib/backend.js +38 -0
  259. package/tempoch-js/tempoch-node/lib/qttyCompat.js +92 -0
  260. package/tempoch-js/tempoch-node/native.cjs +317 -0
  261. package/tempoch-js/tempoch-node/package-lock.json +3223 -0
  262. package/tempoch-js/tempoch-node/package.json +56 -0
  263. package/tempoch-js/tempoch-node/src/lib.rs +573 -0
  264. package/tempoch-js/tempoch-web/Cargo.toml +23 -0
  265. package/tempoch-js/tempoch-web/index.d.ts +95 -0
  266. package/tempoch-js/tempoch-web/index.js +27 -0
  267. package/tempoch-js/tempoch-web/lib/JulianDate.js +170 -0
  268. package/tempoch-js/tempoch-web/lib/ModifiedJulianDate.js +145 -0
  269. package/tempoch-js/tempoch-web/lib/Period.js +121 -0
  270. package/tempoch-js/tempoch-web/lib/backend.js +118 -0
  271. package/tempoch-js/tempoch-web/package.json +46 -0
  272. package/tempoch-js/tempoch-web/src/lib.rs +184 -0
@@ -0,0 +1,111 @@
1
+ //! Re-exports of quantity types specialized to `i64` scalar.
2
+ //!
3
+ //! This module provides type aliases for all unit types using `i64` as the
4
+ //! underlying scalar type. Integer quantities provide compile-time unit safety
5
+ //! for discrete values (timestamps, counters, high-precision integer measurements, etc.).
6
+ //!
7
+ //! Integer quantities support basic arithmetic but **not** unit conversion via
8
+ //! [`to()`](crate::Quantity::to). Use [`to_lossy()`](crate::Quantity::to_lossy)
9
+ //! for lossy (truncating) conversion between units.
10
+ //!
11
+ //! # Example
12
+ //!
13
+ //! ```rust
14
+ //! use qtty::i64::{Meters, Nanoseconds};
15
+ //!
16
+ //! let distance: Meters = Meters::new(1_000_000);
17
+ //! let time: Nanoseconds = Nanoseconds::new(500_000_000);
18
+ //! ```
19
+
20
+ use crate::Quantity;
21
+
22
+ // ─────────────────────────────────────────────────────────────────────────────
23
+ // Angular units (i64)
24
+ // ─────────────────────────────────────────────────────────────────────────────
25
+
26
+ /// Degrees with `i64` scalar.
27
+ pub type Degrees = Quantity<crate::angular::Degree, i64>;
28
+ /// Radians with `i64` scalar.
29
+ pub type Radians = Quantity<crate::angular::Radian, i64>;
30
+ /// Arcminutes with `i64` scalar.
31
+ pub type Arcminutes = Quantity<crate::angular::Arcminute, i64>;
32
+ /// Arcseconds with `i64` scalar.
33
+ pub type Arcseconds = Quantity<crate::angular::Arcsecond, i64>;
34
+ /// Milliradians with `i64` scalar.
35
+ pub type Milliradians = Quantity<crate::angular::Milliradian, i64>;
36
+ /// Milliarcseconds with `i64` scalar.
37
+ pub type MilliArcseconds = Quantity<crate::angular::MilliArcsecond, i64>;
38
+ /// Microarcseconds with `i64` scalar.
39
+ pub type MicroArcseconds = Quantity<crate::angular::MicroArcsecond, i64>;
40
+ /// Gradians with `i64` scalar.
41
+ pub type Gradians = Quantity<crate::angular::Gradian, i64>;
42
+ /// Turns with `i64` scalar.
43
+ pub type Turns = Quantity<crate::angular::Turn, i64>;
44
+ /// Hour angles with `i64` scalar.
45
+ pub type HourAngles = Quantity<crate::angular::HourAngle, i64>;
46
+
47
+ // ─────────────────────────────────────────────────────────────────────────────
48
+ // Length units (i64)
49
+ // ─────────────────────────────────────────────────────────────────────────────
50
+
51
+ /// Meters with `i64` scalar.
52
+ pub type Meters = Quantity<crate::length::Meter, i64>;
53
+ /// Kilometers with `i64` scalar.
54
+ pub type Kilometers = Quantity<crate::length::Kilometer, i64>;
55
+ /// Centimeters with `i64` scalar.
56
+ pub type Centimeters = Quantity<crate::length::Centimeter, i64>;
57
+ /// Millimeters with `i64` scalar.
58
+ pub type Millimeters = Quantity<crate::length::Millimeter, i64>;
59
+ /// Micrometers with `i64` scalar.
60
+ pub type Micrometers = Quantity<crate::length::Micrometer, i64>;
61
+ /// Nanometers with `i64` scalar.
62
+ pub type Nanometers = Quantity<crate::length::Nanometer, i64>;
63
+ /// Astronomical units with `i64` scalar.
64
+ pub type AstronomicalUnits = Quantity<crate::length::AstronomicalUnit, i64>;
65
+ /// Light years with `i64` scalar.
66
+ pub type LightYears = Quantity<crate::length::LightYear, i64>;
67
+ /// Parsecs with `i64` scalar.
68
+ pub type Parsecs = Quantity<crate::length::Parsec, i64>;
69
+
70
+ // ─────────────────────────────────────────────────────────────────────────────
71
+ // Time units (i64)
72
+ // ─────────────────────────────────────────────────────────────────────────────
73
+
74
+ /// Seconds with `i64` scalar.
75
+ pub type Seconds = Quantity<crate::time::Second, i64>;
76
+ /// Milliseconds with `i64` scalar.
77
+ pub type Milliseconds = Quantity<crate::time::Millisecond, i64>;
78
+ /// Microseconds with `i64` scalar.
79
+ pub type Microseconds = Quantity<crate::time::Microsecond, i64>;
80
+ /// Nanoseconds with `i64` scalar.
81
+ pub type Nanoseconds = Quantity<crate::time::Nanosecond, i64>;
82
+ /// Minutes with `i64` scalar.
83
+ pub type Minutes = Quantity<crate::time::Minute, i64>;
84
+ /// Hours with `i64` scalar.
85
+ pub type Hours = Quantity<crate::time::Hour, i64>;
86
+ /// Days with `i64` scalar.
87
+ pub type Days = Quantity<crate::time::Day, i64>;
88
+ /// Years with `i64` scalar.
89
+ pub type Years = Quantity<crate::time::Year, i64>;
90
+
91
+ // ─────────────────────────────────────────────────────────────────────────────
92
+ // Mass units (i64)
93
+ // ─────────────────────────────────────────────────────────────────────────────
94
+
95
+ /// Grams with `i64` scalar.
96
+ pub type Grams = Quantity<crate::mass::Gram, i64>;
97
+ /// Kilograms with `i64` scalar.
98
+ pub type Kilograms = Quantity<crate::mass::Kilogram, i64>;
99
+ /// Solar masses with `i64` scalar.
100
+ pub type SolarMasses = Quantity<crate::mass::SolarMass, i64>;
101
+
102
+ // ─────────────────────────────────────────────────────────────────────────────
103
+ // Power units (i64)
104
+ // ─────────────────────────────────────────────────────────────────────────────
105
+
106
+ /// Watts with `i64` scalar.
107
+ pub type Watts = Quantity<crate::power::Watt, i64>;
108
+ /// Kilowatts with `i64` scalar.
109
+ pub type Kilowatts = Quantity<crate::power::Kilowatt, i64>;
110
+ /// Solar luminosities with `i64` scalar.
111
+ pub type SolarLuminosities = Quantity<crate::power::SolarLuminosity, i64>;
@@ -0,0 +1,111 @@
1
+ //! Re-exports of quantity types specialized to `i8` scalar.
2
+ //!
3
+ //! This module provides type aliases for all unit types using `i8` as the
4
+ //! underlying scalar type. Integer quantities provide compile-time unit safety
5
+ //! for discrete values (counters, pixel coordinates, ADC readings, etc.).
6
+ //!
7
+ //! Integer quantities support basic arithmetic but **not** unit conversion via
8
+ //! [`to()`](crate::Quantity::to). Use [`to_lossy()`](crate::Quantity::to_lossy)
9
+ //! for lossy (truncating) conversion between units.
10
+ //!
11
+ //! # Example
12
+ //!
13
+ //! ```rust
14
+ //! use qtty::i8::{Meters, Seconds};
15
+ //!
16
+ //! let distance: Meters = Meters::new(120);
17
+ //! let time: Seconds = Seconds::new(10);
18
+ //! ```
19
+
20
+ use crate::Quantity;
21
+
22
+ // ─────────────────────────────────────────────────────────────────────────────
23
+ // Angular units (i8)
24
+ // ─────────────────────────────────────────────────────────────────────────────
25
+
26
+ /// Degrees with `i8` scalar.
27
+ pub type Degrees = Quantity<crate::angular::Degree, i8>;
28
+ /// Radians with `i8` scalar.
29
+ pub type Radians = Quantity<crate::angular::Radian, i8>;
30
+ /// Arcminutes with `i8` scalar.
31
+ pub type Arcminutes = Quantity<crate::angular::Arcminute, i8>;
32
+ /// Arcseconds with `i8` scalar.
33
+ pub type Arcseconds = Quantity<crate::angular::Arcsecond, i8>;
34
+ /// Milliradians with `i8` scalar.
35
+ pub type Milliradians = Quantity<crate::angular::Milliradian, i8>;
36
+ /// Milliarcseconds with `i8` scalar.
37
+ pub type MilliArcseconds = Quantity<crate::angular::MilliArcsecond, i8>;
38
+ /// Microarcseconds with `i8` scalar.
39
+ pub type MicroArcseconds = Quantity<crate::angular::MicroArcsecond, i8>;
40
+ /// Gradians with `i8` scalar.
41
+ pub type Gradians = Quantity<crate::angular::Gradian, i8>;
42
+ /// Turns with `i8` scalar.
43
+ pub type Turns = Quantity<crate::angular::Turn, i8>;
44
+ /// Hour angles with `i8` scalar.
45
+ pub type HourAngles = Quantity<crate::angular::HourAngle, i8>;
46
+
47
+ // ─────────────────────────────────────────────────────────────────────────────
48
+ // Length units (i8)
49
+ // ─────────────────────────────────────────────────────────────────────────────
50
+
51
+ /// Meters with `i8` scalar.
52
+ pub type Meters = Quantity<crate::length::Meter, i8>;
53
+ /// Kilometers with `i8` scalar.
54
+ pub type Kilometers = Quantity<crate::length::Kilometer, i8>;
55
+ /// Centimeters with `i8` scalar.
56
+ pub type Centimeters = Quantity<crate::length::Centimeter, i8>;
57
+ /// Millimeters with `i8` scalar.
58
+ pub type Millimeters = Quantity<crate::length::Millimeter, i8>;
59
+ /// Micrometers with `i8` scalar.
60
+ pub type Micrometers = Quantity<crate::length::Micrometer, i8>;
61
+ /// Nanometers with `i8` scalar.
62
+ pub type Nanometers = Quantity<crate::length::Nanometer, i8>;
63
+ /// Astronomical units with `i8` scalar.
64
+ pub type AstronomicalUnits = Quantity<crate::length::AstronomicalUnit, i8>;
65
+ /// Light years with `i8` scalar.
66
+ pub type LightYears = Quantity<crate::length::LightYear, i8>;
67
+ /// Parsecs with `i8` scalar.
68
+ pub type Parsecs = Quantity<crate::length::Parsec, i8>;
69
+
70
+ // ─────────────────────────────────────────────────────────────────────────────
71
+ // Time units (i8)
72
+ // ─────────────────────────────────────────────────────────────────────────────
73
+
74
+ /// Seconds with `i8` scalar.
75
+ pub type Seconds = Quantity<crate::time::Second, i8>;
76
+ /// Milliseconds with `i8` scalar.
77
+ pub type Milliseconds = Quantity<crate::time::Millisecond, i8>;
78
+ /// Microseconds with `i8` scalar.
79
+ pub type Microseconds = Quantity<crate::time::Microsecond, i8>;
80
+ /// Nanoseconds with `i8` scalar.
81
+ pub type Nanoseconds = Quantity<crate::time::Nanosecond, i8>;
82
+ /// Minutes with `i8` scalar.
83
+ pub type Minutes = Quantity<crate::time::Minute, i8>;
84
+ /// Hours with `i8` scalar.
85
+ pub type Hours = Quantity<crate::time::Hour, i8>;
86
+ /// Days with `i8` scalar.
87
+ pub type Days = Quantity<crate::time::Day, i8>;
88
+ /// Years with `i8` scalar.
89
+ pub type Years = Quantity<crate::time::Year, i8>;
90
+
91
+ // ─────────────────────────────────────────────────────────────────────────────
92
+ // Mass units (i8)
93
+ // ─────────────────────────────────────────────────────────────────────────────
94
+
95
+ /// Grams with `i8` scalar.
96
+ pub type Grams = Quantity<crate::mass::Gram, i8>;
97
+ /// Kilograms with `i8` scalar.
98
+ pub type Kilograms = Quantity<crate::mass::Kilogram, i8>;
99
+ /// Solar masses with `i8` scalar.
100
+ pub type SolarMasses = Quantity<crate::mass::SolarMass, i8>;
101
+
102
+ // ─────────────────────────────────────────────────────────────────────────────
103
+ // Power units (i8)
104
+ // ─────────────────────────────────────────────────────────────────────────────
105
+
106
+ /// Watts with `i8` scalar.
107
+ pub type Watts = Quantity<crate::power::Watt, i8>;
108
+ /// Kilowatts with `i8` scalar.
109
+ pub type Kilowatts = Quantity<crate::power::Kilowatt, i8>;
110
+ /// Solar luminosities with `i8` scalar.
111
+ pub type SolarLuminosities = Quantity<crate::power::SolarLuminosity, i8>;
@@ -0,0 +1,238 @@
1
+ //! Strongly typed physical quantities and conversions.
2
+ //!
3
+ //! `qtty` is the user-facing crate in this workspace. It re-exports the full API from `qtty-core` plus a curated set
4
+ //! of predefined units (time, angles, lengths, …).
5
+ //!
6
+ //! The core idea is: a value is always a `Quantity<U, S>`, where `U` is a zero-sized type describing the unit and
7
+ //! `S` is the scalar type (defaults to `f64`). This keeps units at compile time with no runtime overhead beyond
8
+ //! the scalar's size.
9
+ //!
10
+ //! # What this crate solves
11
+ //!
12
+ //! - Prevents mixing incompatible dimensions (you can't add metres to seconds).
13
+ //! - Makes unit conversion explicit and type-checked (`to::<TargetUnit>()`).
14
+ //! - Provides a small set of astronomy-friendly units (AU, light-year, solar mass/luminosity, …).
15
+ //! - Supports multiple scalar types (`f64`, `f32`, and optionally `Decimal`, `Rational64`, etc.).
16
+ //!
17
+ //! # What this crate does not try to solve
18
+ //!
19
+ //! - Arbitrary symbolic unit algebra (e.g. `m^2 * s^-1`) or automatic simplification of arbitrary expressions.
20
+ //! - A full SI-prefix system; only the units defined in this crate are available out of the box.
21
+ //!
22
+ //! # Quick start
23
+ //!
24
+ //! Convert degrees to radians:
25
+ //!
26
+ //! ```rust
27
+ //! use qtty::{Degrees, Radian};
28
+ //!
29
+ //! let a = Degrees::new(180.0);
30
+ //! let r = a.to::<Radian>();
31
+ //! assert!((r.value() - core::f64::consts::PI).abs() < 1e-12);
32
+ //! ```
33
+ //!
34
+ //! Compose and use derived units (velocity = length / time):
35
+ //!
36
+ //! ```rust
37
+ //! use qtty::{Kilometer, Kilometers, Second, Seconds};
38
+ //! use qtty::velocity::Velocity;
39
+ //!
40
+ //! let d = Kilometers::new(1_000.0);
41
+ //! let t = Seconds::new(100.0);
42
+ //! let v: Velocity<Kilometer, Second> = d / t;
43
+ //! assert!((v.value() - 10.0).abs() < 1e-12);
44
+ //! ```
45
+ //!
46
+ //! Using `f32` for memory efficiency:
47
+ //!
48
+ //! ```rust
49
+ //! use qtty::f32::{Degrees, Meters};
50
+ //!
51
+ //! let angle: Degrees = Degrees::new(45.0_f32);
52
+ //! let distance: Meters = Meters::new(100.0_f32);
53
+ //! ```
54
+ //!
55
+ //! # Incorrect usage (type error)
56
+ //!
57
+ //! ```compile_fail
58
+ //! use qtty::{Kilometers, Seconds};
59
+ //!
60
+ //! let d = Kilometers::new(1.0);
61
+ //! let t = Seconds::new(1.0);
62
+ //! let _ = d + t; // cannot add different unit types
63
+ //! ```
64
+ //!
65
+ //! # Scalar Types
66
+ //!
67
+ //! The default scalar type is `f64`. You can use different scalar types:
68
+ //!
69
+ //! - `f64` (default) - double precision floating point
70
+ //! - `f32` - single precision floating point (use `qtty::f32::*`)
71
+ //! - `i8`, `i16`, `i32`, `i64`, `i128` - signed integers
72
+ //! (use `qtty::i8::*`, `qtty::i16::*`, `qtty::i32::*`, `qtty::i64::*`, `qtty::i128::*`)
73
+ //! - `Decimal` - exact decimal (feature `scalar-decimal`)
74
+ //! - `Rational64` - exact rational (feature `scalar-rational`)
75
+ //!
76
+ //! Integer quantities provide compile-time unit safety for discrete values.
77
+ //! They support basic arithmetic and lossy unit conversion via
78
+ //! [`to_lossy()`](crate::Quantity::to_lossy), but not the full [`to()`](crate::Quantity::to)
79
+ //! method (which requires floating-point semantics).
80
+ //!
81
+ //! # Modules
82
+ //!
83
+ //! Units are grouped by dimension under modules (also re-exported at the crate root for convenience):
84
+ //!
85
+ //! - `qtty::angular` (degrees, radians, arcseconds, wrapping/trigonometry helpers)
86
+ //! - `qtty::time` (seconds, days, years, …)
87
+ //! - `qtty::length` (metres, kilometres, AU, light-year, …)
88
+ //! - `qtty::mass` (grams, kilograms, solar mass)
89
+ //! - `qtty::power` (watts, solar luminosity)
90
+ //! - `qtty::velocity` (`Length / Time` aliases)
91
+ //! - `qtty::frequency` (`Angular / Time` aliases)
92
+ //! - `qtty::f32` (all units with `f32` scalar)
93
+ //! - `qtty::f64` (all units with `f64` scalar - same as root)
94
+ //! - `qtty::i8` (all units with `i8` scalar)
95
+ //! - `qtty::i16` (all units with `i16` scalar)
96
+ //! - `qtty::i32` (all units with `i32` scalar)
97
+ //! - `qtty::i64` (all units with `i64` scalar)
98
+ //! - `qtty::i128` (all units with `i128` scalar)
99
+ //!
100
+ //! # Feature flags
101
+ //!
102
+ //! - `std` (default): enables `std` support in `qtty-core`.
103
+ //! - `cross-unit-ops` (default): enables direct cross-unit comparison operators (`==`, `<`, etc.) for built-in units.
104
+ //! - `alloc`: enables heap-backed helpers (like `qtty_vec!(vec ...)`) in `no_std` builds.
105
+ //! - `serde`: enables `serde` support for `Quantity<U>`; serialization is the raw `f64` value only.
106
+ //! - `scalar-decimal`: enables `rust_decimal::Decimal` as a scalar type.
107
+ //! - `scalar-rational`: enables `num_rational::Rational64` as a scalar type.
108
+ //!
109
+ //! Disable default features for `no_std`:
110
+ //!
111
+ //! ```toml
112
+ //! [dependencies]
113
+ //! qtty = { version = "0.2.0", default-features = false }
114
+ //! ```
115
+ //!
116
+ //! If you need `qtty_vec!(vec ...)` in `no_std`, enable `alloc`:
117
+ //!
118
+ //! ```toml
119
+ //! [dependencies]
120
+ //! qtty = { version = "0.2.0", default-features = false, features = ["alloc"] }
121
+ //! ```
122
+ //!
123
+ //! # Panics and errors
124
+ //!
125
+ //! This crate does not define an error type and does not return `Result` from its core operations. Conversions and
126
+ //! arithmetic are pure computations; they do not panic on their own, but they follow IEEE-754 behavior for floats
127
+ //! (NaN and infinities propagate according to the underlying operation).
128
+ //!
129
+ //! # SemVer and stability
130
+ //!
131
+ //! This workspace is currently `0.x`. Expect breaking changes between minor versions until `1.0`.
132
+ #![cfg_attr(not(feature = "std"), no_std)]
133
+ #![forbid(unsafe_code)]
134
+
135
+ #[cfg(all(feature = "alloc", not(feature = "std")))]
136
+ extern crate alloc;
137
+
138
+ pub use qtty_core::*;
139
+
140
+ /// Derive macro used by `qtty-core` to define unit marker types.
141
+ ///
142
+ /// This macro expands in terms of `crate::Unit` and `crate::Quantity`, so it is intended for use inside `qtty-core`
143
+ /// (or crates exposing the same crate-root API). Most users should not need this.
144
+ pub use qtty_derive::Unit;
145
+
146
+ // ─────────────────────────────────────────────────────────────────────────────
147
+ // Scalar-specific modules
148
+ // ─────────────────────────────────────────────────────────────────────────────
149
+
150
+ pub mod f32;
151
+ pub mod f64;
152
+ pub mod i128;
153
+ pub mod i16;
154
+ pub mod i32;
155
+ pub mod i64;
156
+ pub mod i8;
157
+
158
+ // ─────────────────────────────────────────────────────────────────────────────
159
+ // Unit modules (grouped by dimension)
160
+ // ─────────────────────────────────────────────────────────────────────────────
161
+
162
+ pub use qtty_core::units::angular;
163
+ pub use qtty_core::units::area;
164
+ pub use qtty_core::units::frequency;
165
+ pub use qtty_core::units::length;
166
+ pub use qtty_core::units::mass;
167
+ pub use qtty_core::units::power;
168
+ pub use qtty_core::units::time;
169
+ pub use qtty_core::units::unitless;
170
+ pub use qtty_core::units::velocity;
171
+ pub use qtty_core::units::volume;
172
+
173
+ // ─────────────────────────────────────────────────────────────────────────────
174
+ // Convenience re-exports (default f64 types)
175
+ // ─────────────────────────────────────────────────────────────────────────────
176
+
177
+ pub use qtty_core::units::angular::*;
178
+ pub use qtty_core::units::area::*;
179
+ pub use qtty_core::units::frequency::*;
180
+ pub use qtty_core::units::length::*;
181
+ pub use qtty_core::units::mass::*;
182
+ pub use qtty_core::units::power::*;
183
+ pub use qtty_core::units::time::*;
184
+ pub use qtty_core::units::velocity::*;
185
+ pub use qtty_core::units::volume::*;
186
+
187
+ #[doc(hidden)]
188
+ pub mod __private {
189
+ #[cfg(all(feature = "alloc", not(feature = "std")))]
190
+ pub use alloc::vec::Vec;
191
+ #[cfg(feature = "std")]
192
+ pub use std::vec::Vec;
193
+ }
194
+
195
+ /// Build typed quantities from scalar literals without repeating `Unit::new(...)`.
196
+ ///
197
+ /// # Forms
198
+ ///
199
+ /// - Array (const-friendly):
200
+ /// `qtty::qtty_vec!(Seconds; 1.0, 2.0, 3.0)`
201
+ /// - Vector:
202
+ /// `qtty::qtty_vec!(vec Seconds; 1.0, 2.0, 3.0)` (requires `std` or `alloc`)
203
+ ///
204
+ /// # Examples
205
+ ///
206
+ /// ```
207
+ /// use qtty::Seconds;
208
+ ///
209
+ /// const OFFSETS: [Seconds; 3] = qtty::qtty_vec!(Seconds; 56.86, 63.83, 70.0);
210
+ /// assert_eq!(OFFSETS[1].value(), 63.83);
211
+ ///
212
+ /// let samples: Vec<Seconds> = qtty::qtty_vec!(vec Seconds; 1.0, 2.0, 3.0);
213
+ /// assert_eq!(samples.len(), 3);
214
+ /// ```
215
+ #[cfg(any(feature = "std", feature = "alloc"))]
216
+ #[macro_export]
217
+ macro_rules! qtty_vec {
218
+ (vec $unit:ty; $($value:expr),* $(,)?) => {
219
+ <$crate::__private::Vec<$unit>>::from([$(<$unit>::new($value)),*])
220
+ };
221
+ ($unit:ty; $($value:expr),* $(,)?) => {
222
+ [$(<$unit>::new($value)),*]
223
+ };
224
+ }
225
+
226
+ #[cfg(not(any(feature = "std", feature = "alloc")))]
227
+ #[macro_export]
228
+ macro_rules! qtty_vec {
229
+ (vec $unit:ty; $($value:expr),* $(,)?) => {
230
+ compile_error!(
231
+ "`qtty::qtty_vec!(vec ...)` requires the `std` or `alloc` feature. \
232
+ Use `qtty::qtty_vec!(Unit; ...)` in pure `no_std` builds."
233
+ )
234
+ };
235
+ ($unit:ty; $($value:expr),* $(,)?) => {
236
+ [$(<$unit>::new($value)),*]
237
+ };
238
+ }
@@ -0,0 +1,83 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "libm"
7
+ version = "0.2.16"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
10
+
11
+ [[package]]
12
+ name = "proc-macro2"
13
+ version = "1.0.106"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
16
+ dependencies = [
17
+ "unicode-ident",
18
+ ]
19
+
20
+ [[package]]
21
+ name = "qtty"
22
+ version = "0.4.0"
23
+ dependencies = [
24
+ "qtty-core",
25
+ "qtty-derive",
26
+ ]
27
+
28
+ [[package]]
29
+ name = "qtty-core"
30
+ version = "0.4.0"
31
+ dependencies = [
32
+ "libm",
33
+ "qtty-derive",
34
+ "typenum",
35
+ ]
36
+
37
+ [[package]]
38
+ name = "qtty-derive"
39
+ version = "0.4.0"
40
+ dependencies = [
41
+ "proc-macro2",
42
+ "quote",
43
+ "syn",
44
+ ]
45
+
46
+ [[package]]
47
+ name = "qtty-vec-no-std-fixture"
48
+ version = "0.0.0"
49
+ dependencies = [
50
+ "qtty",
51
+ ]
52
+
53
+ [[package]]
54
+ name = "quote"
55
+ version = "1.0.44"
56
+ source = "registry+https://github.com/rust-lang/crates.io-index"
57
+ checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
58
+ dependencies = [
59
+ "proc-macro2",
60
+ ]
61
+
62
+ [[package]]
63
+ name = "syn"
64
+ version = "2.0.114"
65
+ source = "registry+https://github.com/rust-lang/crates.io-index"
66
+ checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
67
+ dependencies = [
68
+ "proc-macro2",
69
+ "quote",
70
+ "unicode-ident",
71
+ ]
72
+
73
+ [[package]]
74
+ name = "typenum"
75
+ version = "1.19.0"
76
+ source = "registry+https://github.com/rust-lang/crates.io-index"
77
+ checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
78
+
79
+ [[package]]
80
+ name = "unicode-ident"
81
+ version = "1.0.23"
82
+ source = "registry+https://github.com/rust-lang/crates.io-index"
83
+ checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
@@ -0,0 +1,10 @@
1
+ [package]
2
+ name = "qtty-vec-no-std-fixture"
3
+ version = "0.0.0"
4
+ edition = "2021"
5
+ publish = false
6
+
7
+ [dependencies]
8
+ qtty = { path = "../../..", default-features = false }
9
+
10
+ [workspace]
@@ -0,0 +1,7 @@
1
+ #![no_std]
2
+
3
+ use qtty::Seconds;
4
+
5
+ pub fn build_samples() {
6
+ let _ = qtty::qtty_vec!(vec Seconds; 1.0, 2.0, 3.0);
7
+ }
@@ -0,0 +1,83 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "libm"
7
+ version = "0.2.16"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
10
+
11
+ [[package]]
12
+ name = "proc-macro2"
13
+ version = "1.0.106"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
16
+ dependencies = [
17
+ "unicode-ident",
18
+ ]
19
+
20
+ [[package]]
21
+ name = "qtty"
22
+ version = "0.4.0"
23
+ dependencies = [
24
+ "qtty-core",
25
+ "qtty-derive",
26
+ ]
27
+
28
+ [[package]]
29
+ name = "qtty-core"
30
+ version = "0.4.0"
31
+ dependencies = [
32
+ "libm",
33
+ "qtty-derive",
34
+ "typenum",
35
+ ]
36
+
37
+ [[package]]
38
+ name = "qtty-derive"
39
+ version = "0.4.0"
40
+ dependencies = [
41
+ "proc-macro2",
42
+ "quote",
43
+ "syn",
44
+ ]
45
+
46
+ [[package]]
47
+ name = "qtty-vec-no-std-alloc-fixture"
48
+ version = "0.0.0"
49
+ dependencies = [
50
+ "qtty",
51
+ ]
52
+
53
+ [[package]]
54
+ name = "quote"
55
+ version = "1.0.44"
56
+ source = "registry+https://github.com/rust-lang/crates.io-index"
57
+ checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
58
+ dependencies = [
59
+ "proc-macro2",
60
+ ]
61
+
62
+ [[package]]
63
+ name = "syn"
64
+ version = "2.0.114"
65
+ source = "registry+https://github.com/rust-lang/crates.io-index"
66
+ checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
67
+ dependencies = [
68
+ "proc-macro2",
69
+ "quote",
70
+ "unicode-ident",
71
+ ]
72
+
73
+ [[package]]
74
+ name = "typenum"
75
+ version = "1.19.0"
76
+ source = "registry+https://github.com/rust-lang/crates.io-index"
77
+ checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
78
+
79
+ [[package]]
80
+ name = "unicode-ident"
81
+ version = "1.0.23"
82
+ source = "registry+https://github.com/rust-lang/crates.io-index"
83
+ checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
@@ -0,0 +1,10 @@
1
+ [package]
2
+ name = "qtty-vec-no-std-alloc-fixture"
3
+ version = "0.0.0"
4
+ edition = "2021"
5
+ publish = false
6
+
7
+ [dependencies]
8
+ qtty = { path = "../../..", default-features = false, features = ["alloc"] }
9
+
10
+ [workspace]
@@ -0,0 +1,7 @@
1
+ #![no_std]
2
+
3
+ use qtty::Seconds;
4
+
5
+ pub fn build_samples() {
6
+ let _samples = qtty::qtty_vec!(vec Seconds; 1.0, 2.0, 3.0);
7
+ }