Skip to content

Add 32-bit ARM support with portable-atomic for AtomicU64#304

Open
neeme-praks-sympower wants to merge 2 commits intostreamfold:mainfrom
neeme-praks-sympower:add-32bit-support
Open

Add 32-bit ARM support with portable-atomic for AtomicU64#304
neeme-praks-sympower wants to merge 2 commits intostreamfold:mainfrom
neeme-praks-sympower:add-32bit-support

Conversation

@neeme-praks-sympower
Copy link
Contributor

  • Add support for 32-bit ARM targets: armv5te-unknown-linux-gnueabi (soft float) and armv7-unknown-linux-gnueabihf (hard float)
  • Replace std::sync::atomic::AtomicU64 with portable-atomic crate for 32-bit compatibility
  • Add CI build job for cross-compiling 32-bit ARM binaries

Part of #299

Details

32-bit ARM platforms lack native 64-bit atomic operations. This PR adds the portable-atomic crate with the fallback feature, which provides software-based atomic operations on platforms without hardware support.

CI Build Configuration

The new ARM32 build job:

  • Runs on ubuntu-22.04
  • Installs cross-compilation toolchains (gcc-arm-linux-gnueabi, gcc-arm-linux-gnueabihf)
  • Builds with --no-default-features --features file_receiver to avoid rdkafka (which has cross-compilation limitations)

@neeme-praks-sympower
Copy link
Contributor Author

I also need to patch opentelemetry-rust to support 32-bits.

@neeme-praks-sympower
Copy link
Contributor Author

I added 32-bit support to OpenTelemetry RUST SDK: open-telemetry/opentelemetry-rust@0948c61

In order to verify my changes in this branch, I had to update some dependencies. Once Rotel updates to OpenTelemetry RUST SDK 0.32 then we can drop those changes from this branch.

@mheffner
Copy link
Contributor

mheffner commented Feb 6, 2026

This looks good to me, however I'd like to split the tonic, prost and otel lib changes into their own separate PR. The bumps for tonic/prost look large, so I'd like to ensure we rerun some of our benchmarks to make sure there aren't perf regressions. If you'd be up for splitting those off, we could take a look.

Caveat, our availability over the next week is limited due to travel. Response time may be longer over the next week.

@neeme-praks-sympower
Copy link
Contributor Author

This looks good to me, however I'd like to split the tonic, prost and otel lib changes into their own separate PR. The bumps for tonic/prost look large, so I'd like to ensure we rerun some of our benchmarks to make sure there aren't perf regressions. If you'd be up for splitting those off, we could take a look.

No problem, done: #306

- Add armv5te-unknown-linux-gnueabi (soft float) and armv7-unknown-linux-gnueabihf (hard float) build targets to CI
- Replace std::sync::atomic::AtomicU64 with portable-atomic crate to support platforms without native 64-bit atomics
- Build ARM32 targets with --no-default-features --features file_receiver
@neeme-praks-sympower
Copy link
Contributor Author

In case you want to keep the number of dependencies to minimum, I can make portable-atomic conditional, like in OTEL SDK: open-telemetry/opentelemetry-rust@0948c61
Let me know.

@neeme-praks-sympower
Copy link
Contributor Author

In case you want to keep the number of dependencies to minimum, I can make portable-atomic conditional, like in OTEL SDK: open-telemetry/opentelemetry-rust@0948c61 Let me know.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants