-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support 32-bit Architectures / Replace usize
with u64
#5351
Comments
I think changing to use u64 would make sense as part of a broader initiative to support wasm32. However, given the crate currently doesn't support anything other than in memory for wasm32, I think it would be a pretty tough sell given the downstream impact of such a change. Not to mention quite hard to test. |
u64
vs usize
)
I was running into this today as well. The |
u64
vs usize
)usize
with u64
Now with OpenDAL's awesome I think it's worthwhile to improve wasm32 support at this point. |
The next release is a major one #6903, so now is the time if anyone wants to pick this up |
I understand the problem theoretically, but can someone tell me what doesn't work practically? I ask as I was trying to verify @XiangpengHao 's nice PR to make this change: But I found I could run the tests / build for object_store on wasm32 just fine 🤔 |
My use case is that when trying to load hits.parquet (15GB) into browser-based parquet-viewer, it will fail to read the correct file range, because the file size is larger than what usize on wasm32 (essentially u32) can represent. To allow larger than 4GB ranges, we need to use u64 instead of usize to represent ranges. For example: range
I think this is because we don't have test cases for large ranges. |
[First, sorry for the flurry of issues and thank you for your responsiveness. Second, I apologize that this issue will be vague and without a repro case.]
Rust's file
seek
for local files usesu64
, notusize
. This allows even 32-bit OS to access regions of files beyond 4GB.object_store's
get_range
and many related methods useusize
. This works fine on a 64-bit OS, but on a 32-bit OS (including WASM32) using HTTP I think limits one to the first 4GB of any file.Possible fixes:
Thanks,
Carl
The text was updated successfully, but these errors were encountered: