@@ -317,14 +317,15 @@ available on crates.io, such as the [aHash][ahash-crate] crate.
317
317
318
318
This crate's minimum supported Rust versions (MSRV) are the followings:
319
319
320
- | Enabled Feature | MSRV |
321
- | :---------------------| :------------|
322
- | no feature (default) | Rust 1.45.2 |
323
- | ` future ` | Rust 1.46.0 |
324
-
325
- If no feature is enabled, MSRV will be updated conservatively. When using other
326
- features, like ` future ` , MSRV might be updated more frequently, up to the latest
327
- stable. In both cases, increasing MSRV is _ not_ considered a semver-breaking
320
+ | Feature | Enabled by default? | MSRV |
321
+ | :-----------| :-------------------:| :-----------:|
322
+ | no feature | | Rust 1.45.2 |
323
+ | ` atomic64 ` | yes | Rust 1.45.2 |
324
+ | ` future ` | | Rust 1.46.0 |
325
+
326
+ If only the default features are enabled, MSRV will be updated conservatively. When
327
+ using other features, like ` future ` , MSRV might be updated more frequently, up to the
328
+ latest stable. In both cases, increasing MSRV is _ not_ considered a semver-breaking
328
329
change.
329
330
330
331
<!--
@@ -334,6 +335,50 @@ change.
334
335
-->
335
336
336
337
338
+ ## Resolving Compile Errors on Some 32-bit Platforms
339
+
340
+ On some 32-bit target platforms including the followings, you may encounter compile
341
+ errors in quanta crate and Moka itself.
342
+
343
+ - ` armv5te-unknown-linux-musleabi `
344
+ - ` mips-unknown-linux-musl `
345
+ - ` mipsel-unknown-linux-musl `
346
+
347
+ ``` console
348
+ error[E0599]: no method named `fetch_add` found for struct `Arc<AtomicCell<u64>>` in the current scope
349
+ --> ... /quanta-0.9.2/src/mock.rs:48:21
350
+ |
351
+ 48 | self.offset.fetch_add(amount.into_nanos());
352
+ | ^^^^^^^^^ method not found in `Arc<AtomicCell<u64>>`
353
+ ```
354
+
355
+ ``` console
356
+ error[E0432]: unresolved import `std::sync::atomic::AtomicU64`
357
+ --> ... /moka-0.5.3/src/sync.rs:10:30
358
+ |
359
+ 10 | atomic::{AtomicBool, AtomicU64, Ordering},
360
+ | ^^^^^^^^^
361
+ | |
362
+ | no `AtomicU64` in `sync::atomic`
363
+ ```
364
+
365
+ These errors occur because ` std::sync::atomic::AtomicU64 ` type is not provided on
366
+ these platforms but both quanta and Moka use it.
367
+
368
+ You can resolve the errors by disabling the default features of Moka. Edit your
369
+ Cargo.toml to add ` default-features = false ` option to the dependency declaration.
370
+
371
+ ``` toml:Cargo.toml
372
+ [dependencies ]
373
+ moka = { version = " 0.5" , default-feautures = false }
374
+ # Or
375
+ moka = { version = " 0.5" , default-feautures = false , features = [" future" ] }
376
+ ```
377
+
378
+ This will remove quanta from the dependencies and enable a fall-back implementation
379
+ in Moka, so it will compile.
380
+
381
+
337
382
## Developing Moka
338
383
339
384
** Running All Tests**
0 commit comments