-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[WasmFS] Adds support for large (>4GB) files in OPFS using __i53abi #22561
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
Changes from 4 commits
2936165
a2bcb3f
8dbd011
e51dbc2
89ec894
79f0f55
e98906a
689a110
89cd47e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,28 +67,27 @@ void _wasmfs_opfs_free_directory(int dir_id); | |
| int _wasmfs_opfs_read_access(int access_id, | ||
| uint8_t* buf, | ||
| uint32_t len, | ||
| uint32_t pos); | ||
| off_t pos); | ||
|
|
||
| int _wasmfs_opfs_read_blob(em_proxying_ctx* ctx, | ||
| int blob_id, | ||
| uint8_t* buf, | ||
| uint32_t len, | ||
| uint32_t pos, | ||
| off_t pos, | ||
| int32_t* nread); | ||
|
|
||
| // Synchronous write. Return the number of bytes written. | ||
| int _wasmfs_opfs_write_access(int access_id, | ||
| const uint8_t* buf, | ||
| uint32_t len, | ||
| uint32_t pos); | ||
| off_t pos); | ||
|
|
||
| // Get the size via an AccessHandle. | ||
| void _wasmfs_opfs_get_size_access(em_proxying_ctx* ctx, | ||
| int access_id, | ||
| off_t* size); | ||
|
|
||
| // TODO: return 64-byte off_t. | ||
| uint32_t _wasmfs_opfs_get_size_blob(int blob_id); | ||
| void _wasmfs_opfs_get_size_blob(int blob_id, off_t* size); | ||
|
||
|
|
||
| // Get the size of a file handle via a File Blob. | ||
| void _wasmfs_opfs_get_size_file(em_proxying_ctx* ctx, int file_id, off_t* size); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of these sigs should be needed since I believe they are already stored in src/library_sigs.js
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sigs need to be updated. Not sure if those changes have been added to this request. I had to add them for testing, but are not needed once library_sigs.js is updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, changes to function signatures should be accompanied by the change in
library_sigs.js. I normally rebuild using./test/runner other.test_gen_sig_info --rebase.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the sigs. Just need to make sure that they are updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should mention that during development when I add a
__i53abidecorator to a function in my own library (outside of the emscripten library) and did not have an explicit sig, the implicit sigs would be wrong (in my case it used a BigInt because I had WASM_BIGINT selected). How are the sigs determined at compile/link time?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__sigattributes are pre-calculated for builtin JS libraries (viatools/maint/gen_sig_info.py). For external libraries you need to specifiy the__sigmanually, alongside the function.I made a change recently that will make it impossible to forget to add the
__sigwhen using__i53abi: #22557