Skip to content
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

Stop using protobuf.js for encoding/decoding on Kotlin/JS #279

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

garyp
Copy link
Collaborator

@garyp garyp commented Aug 31, 2024

This resolves a bunch of protobuf conformance test failures on Kotlin/JS that were being caused by protobuf.js. It also removes a dependency. There's a possibility that the protobuf.js implementation of low-level protobuf encoding/decoding is more optimized for JS runtimes than pbandk's Kotlin-based implementation. But I'd rather spend time on optimizing pbandk's implementation, which would also benefit other platforms in addition to Kotlin/JS, than on fighting bugs in protobuf.js that aren't going to be fixed any time soon.

Also replaced the utf8Len() implementation that was based on code from Google's Protobuf Java library with a simpler implementation derived from Okio code.

This resolves a bunch of protobuf conformance test failures on Kotlin/JS
that were being caused by protobuf.js. It also removes a dependency.
There's a possibility that the protobuf.js implementation of low-level
protobuf encoding/decoding is more optimized for JS runtimes than
pbandk's Kotlin-based implementation. But I'd rather spend time on
optimizing pbandk's implementation, which would also benefit other
platforms in addition to Kotlin/JS, than on fighting bugs in protobuf.js
that aren't going to be fixed any time soon.

Also replaced the `utf8Len()` implementation that was based on code from
Google's Protobuf Java library with a simpler implementation derived
from Okio code.
@garyp garyp force-pushed the garyp/remove-protobufjs branch from 2567123 to 5d37d92 Compare August 31, 2024 01:53
@garyp garyp merged commit 61a1e32 into master Aug 31, 2024
10 checks passed
@garyp garyp deleted the garyp/remove-protobufjs branch August 31, 2024 02:38
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.

1 participant