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

add c utf8 TextDecoder/TextEncoder implementation #448

Closed
wants to merge 1 commit into from

Conversation

lal12
Copy link
Contributor

@lal12 lal12 commented Jan 13, 2024

Probably not the most efficient implementation, but ofc still much quicker than the JS implementation before.
It follows the spec pseudo code: https://encoding.spec.whatwg.org/

There is a patch needed for quickjs to expose some internal functionality. I will look further review the patch and submit it when I get a go ahead here.

expose_string_internals.zip (Github doesn't allow me to upload the patch file directly 🙄 )

Regarding to #447

@lal12
Copy link
Contributor Author

lal12 commented Jan 15, 2024

CI ofc won't succeeed without Quickjs patches.

@lal12
Copy link
Contributor Author

lal12 commented Jan 24, 2024

Hey @saghul, any time estimates on reviewing it?

@saghul
Copy link
Owner

saghul commented Jan 26, 2024

I hope to get some cycles next week, sorry!

@lal12
Copy link
Contributor Author

lal12 commented Jan 26, 2024

I hope to get some cycles next week, sorry!

No worries, just wanted to know for some "planability" for me.

@saghul
Copy link
Owner

saghul commented Feb 27, 2024

So sorry for the delay, life got on the way...

I finally had a chance to look at the internals patch. I'm afraid that is not something we want to expose in QuickJS. Replacing the internal string implementation with ropes is on the cards, and exposing the internals would put us in a precarious situation API-wise.

Let's continue the discussion in #447

@saghul saghul closed this Feb 27, 2024
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