open-telemetry / opentelemetry-rust

The Rust OpenTelemetry implementation
https://opentelemetry.io
Apache License 2.0
1.9k stars 445 forks source link

Add mips 32-bit support #898

Open ghost opened 2 years ago

ghost commented 2 years ago

https://doc.rust-lang.org/std/sync/atomic/index.html

https://github.com/tokio-rs/tokio/blob/master/tokio/src/loom/std/atomic_u64.rs

error[E0432]: unresolved import `std::sync::atomic::AtomicU64`
--> /Users/xxx/.cargo/registry/src/github.com-1ecc6299db9ec823/opentelemetry_sdk-0.18.0/src/metrics/sdk_api/number.rs:3:25
|
3 | use std::sync::atomic::{AtomicU64, Ordering};
|                         ^^^^^^^^^
|                         |
|                         no `AtomicU64` in `sync::atomic`
|                         help: a similar name exists in the module: `AtomicU8`

error[E0283]: type annotations needed
--> /Users/xxx/.cargo/registry/src/github.com-1ecc6299db9ec823/opentelemetry_sdk-0.18.0/src/metrics/sdk_api/number.rs:81:25
|
80 | #[derive(Debug, Default)]
|                 ------- in this derive macro expansion
81 | pub struct AtomicNumber(AtomicU64);
|                         ^^^^^^^^^ cannot infer type
djc commented 2 years ago

I recently accepted a PR that uses the portable-atomic crate in another project I maintain.