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

Use Uint8Array instead of Buffer #28

Open
jstarry opened this issue Jul 7, 2021 · 2 comments · Fixed by #29
Open

Use Uint8Array instead of Buffer #28

jstarry opened this issue Jul 7, 2021 · 2 comments · Fixed by #29

Comments

@jstarry
Copy link

jstarry commented Jul 7, 2021

Hey @pabigot, thanks for this library! We have been using it extensively for manual deserialization of blockchain data at Solana. I would like to propose that this library transition to be more browser friendly by using the Uint8Array type over the Node.js specific Buffer type. Currently we rely on browser polyfills but the latest bundler tools are dropping support for those so it'd be great to remove the need for polyfills entirely.

Are you open to this change being made to the next major release of buffer-layout? I'd be happy to own the transition since if we don't upstream this change, I'll be forking this package instead.

@pabigot
Copy link
Owner

pabigot commented Jul 8, 2021

Yes, given how many people are using this in non-Node.js environments decoupling it makes sense. I'm migrating away from Node for the sorts of applications where I needed this library, so I'm open to you providing the changes necessary for the transition, and transitioning ownership of the resulting v2.0.0 to you. Probably best to start with a PR.

@jstarry
Copy link
Author

jstarry commented Jul 8, 2021

Alright sounds good, will have a PR up soon

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 a pull request may close this issue.

2 participants