-
Notifications
You must be signed in to change notification settings - Fork 37
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
scroll 1.0 #57
Comments
What does it mean to have Edit: Oh, nevermind, I found the PR. 😃 Sorry for the ping. |
Yea so generally it's not a very big deal; i did run into this when i was pwriting very large C structs, and it caused stack overflows, but this is unusual usecase. Similarly, preading out a large C struct is quite difficult without (I believe) very large changes, since it would have to emplace/box the struct without ever touching the stack (otherwise, same issue of stack overflow). But these are generally niche issues. I think the only thing on this list that for sure will happen is removing usize/isize; this was just a fundamnetal mistake on my part, and I don't think the crate should support it (you will be forced to think about the bit width size, i.e.) |
That being said, I do think pwriting references is generally just a good idea, but not sure if we can find a hero to push it through; there were some final concerns at the end w.r.t. ergonomics, as well, but nothing major i believe. What usecases are you imagining using scroll for @zicklag, maybe I could be of help answering questions? |
I've found myself wondering occasionally whether we could make |
@m4b As far as my use-case, I was considering as a possible solution to this question of mine on the forum about needing a I ended up deciding that scroll could be useful for that effort, but we need to get a little further into the next step of the process before I find out exactly what the requirements are for moving on. |
@zicklag yup, your question is precisely what scroll was designed for; e.g., one original usecase was reading the Nth elf sym entries out of an array of @luser yea i think about this sometimes, not sure what it would mean or look like? Do you have any ideas on that front? I assume it would be a feature in scroll, or did you mean somewhere else? :) |
I haven't gone beyond "idle thoughts" with it, but it would be cool if scroll could read and write structs that implemented |
It would be useful to support fallible reading/writing on |
I would suggest removing unsafe code entirely and forbiding it, since it's not actually necessary and safe alternatives are equally fast. I would be happy to author a PR, if an interest exists. |
@Frostie314159 if you have some ideas how to remove the unsafe portions without compromising performance, this sounds great! Perhaps a tentative proof of concept PR, or sketch of ideas here if that's less work. My understanding is most unsafe is in the ptr copy non-overlapping writes, which last i checked is also what byteorder does. |
I'm gonna create a tracking issue, where we can discuss and list uses of unsafe. |
We should probably remove the |
It is time for scroll to become 1.0
I believe the work started by @willglynn and seconded by others, namely, having pwrite take a reference is a good idea, is highly invasive breakage, and probably top priority item.
I may also swap the default endianness from
()
back toctx::Endian
, unless someone protests highly?I would also like to survey unsafe, remove commented code, and some other details.
So:
&str
pwrite?semi-random people who might be interested (feel free to ignore if busy, etc. :):
@luser @philipc @lzutao @willglynn
The text was updated successfully, but these errors were encountered: