Skip to content

fix: force building for the current arch when platform is set to native#615

Merged
xalelax merged 2 commits into
mainfrom
dion/native-means-native
Jun 2, 2026
Merged

fix: force building for the current arch when platform is set to native#615
xalelax merged 2 commits into
mainfrom
dion/native-means-native

Conversation

@dionhaefner

Copy link
Copy Markdown
Contributor

Relevant issue or PR

n/a

Description of changes

When not specifying a platform arg, Docker will pull what's available which may not match the native processor arch. Since Tesseract explicitly documents this as "build for the native architecture", we should force a platform and fail loudly when it's not available.

Testing done

none

@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.20%. Comparing base (6924be0) to head (3d7574e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #615   +/-   ##
=======================================
  Coverage   77.20%   77.20%           
=======================================
  Files          32       32           
  Lines        4528     4528           
  Branches      743      743           
=======================================
  Hits         3496     3496           
  Misses        727      727           
  Partials      305      305           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PasteurBot

PasteurBot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results

Benchmarks use a no-op Tesseract to measure pure framework overhead.

🚀 0 faster, ⚠️ 1 slower, ✅ 35 unchanged

Notable changes

Benchmark Baseline Current Change Status
decoding/base64_100,000 0.611ms 0.803ms +31.4% ⚠️ slower
Full results
Benchmark Baseline Current Change Status
api/apply_1,000 0.496ms 0.500ms +0.9%
api/apply_100,000 0.496ms 0.494ms -0.2%
api/apply_10,000,000 0.496ms 0.495ms -0.3%
cli/apply_1,000 1693.009ms 1716.085ms +1.4%
cli/apply_100,000 1687.771ms 1726.663ms +2.3%
cli/apply_10,000,000 1810.266ms 1757.905ms -2.9%
decoding/base64_1,000 0.029ms 0.028ms -0.5%
decoding/base64_100,000 0.611ms 0.803ms +31.4% ⚠️ slower
decoding/base64_10,000,000 70.657ms 70.469ms -0.3%
decoding/binref_1,000 0.184ms 0.183ms -0.4%
decoding/binref_100,000 0.235ms 0.235ms +0.1%
decoding/binref_10,000,000 8.935ms 8.743ms -2.1%
decoding/json_1,000 0.098ms 0.098ms -0.7%
decoding/json_100,000 9.443ms 9.481ms +0.4%
decoding/json_10,000,000 1110.035ms 1109.346ms -0.1%
encoding/base64_1,000 0.028ms 0.028ms -0.0%
encoding/base64_100,000 0.144ms 0.143ms -0.7%
encoding/base64_10,000,000 21.734ms 21.857ms +0.6%
encoding/binref_1,000 0.275ms 0.273ms -0.5%
encoding/binref_100,000 0.449ms 0.448ms -0.2%
encoding/binref_10,000,000 16.711ms 16.807ms +0.6%
encoding/json_1,000 0.141ms 0.141ms -0.0%
encoding/json_100,000 14.850ms 14.552ms -2.0%
encoding/json_10,000,000 1510.559ms 1519.314ms +0.6%
http/apply_1,000 3.004ms 2.944ms -2.0%
http/apply_100,000 9.692ms 8.761ms -9.6%
http/apply_10,000,000 664.590ms 666.848ms +0.3%
roundtrip/base64_1,000 0.058ms 0.058ms +0.3%
roundtrip/base64_100,000 0.764ms 0.763ms -0.1%
roundtrip/base64_10,000,000 92.389ms 92.080ms -0.3%
roundtrip/binref_1,000 0.471ms 0.473ms +0.4%
roundtrip/binref_100,000 0.691ms 0.682ms -1.3%
roundtrip/binref_10,000,000 25.822ms 25.633ms -0.7%
roundtrip/json_1,000 0.245ms 0.246ms +0.6%
roundtrip/json_100,000 21.739ms 21.616ms -0.6%
roundtrip/json_10,000,000 2625.989ms 2640.613ms +0.6%
  • Runner: Linux 6.17.0-1015-azure x86_64

@xalelax
xalelax merged commit ddb5fb2 into main Jun 2, 2026
52 checks passed
@xalelax
xalelax deleted the dion/native-means-native branch June 2, 2026 15:31
@pasteurlabs pasteurlabs locked and limited conversation to collaborators Jun 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants