async-rs / async-rs/async-std

Build error on MIPS 32bit

Open
#664 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
4.1k
Forks
339
PR merge metrics
No merged PRs in 30d

Description

```
error[E0432]: unresolved import `std::sync::atomic::AtomicU64`
--> [...]/async-std-1.4.0/src/task/task_id.rs:2:25
|
2 | use std::sync::atomic::{AtomicU64, Ordering};
| ^^^^^^^^^
| |
| no `AtomicU64` in `sync::atomic`
| help: a similar name exists in the module: `AtomicU8
```

Unfortunately, according to the docs, 64bit atomic types are not available on 32bit mips architectures.

I've looked into the source location and two solutions to this come to my mind:

1. use AtomicU32. This might or might not be okay on 32bit architectures.
2. Rewrite this (for mips only) with blocking logic (i.e. keep the counter inside a mutex)

If someone tells me which one is the preferred solution, I can write a PR.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.