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

Fix unsound bitmap buffers vec instead of a dropped vec's pointer #176

Closed
wants to merge 1 commit into from

Conversation

samsieber
Copy link
Contributor

Here's my initial attempt at resolving the unsound bitmap buffer method (issue #174), quick and dirty. I'm using it locally in a fork, but this submission is just to give ideas about how you'd like this tackled.

The nice part is that there are method we can use to write code that works equally well on a &[u8] (from the native code path) and a Vec (from the wasm code path):

  • .as_ref() on a &[u8] and a Vec<u8> return the same thing: &[u8]
  • Vec::from(buffer) works on both a &[u8] and Vec<u8>

@ajrcarey
Copy link
Owner

Discussed and resolved as part of #174.

@ajrcarey ajrcarey closed this Nov 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