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

Migrate to windows[-sys] crate #40

Closed
rbtcollins opened this issue Feb 11, 2023 · 8 comments
Closed

Migrate to windows[-sys] crate #40

rbtcollins opened this issue Feb 11, 2023 · 8 comments

Comments

@rbtcollins
Copy link
Owner

This is partially done, but a little stuck on:

@Xaeroxe offered in XAMPPRocky/remove_dir_all#42 to help out; this is a call for that help :)

@Xaeroxe
Copy link
Contributor

Xaeroxe commented Feb 11, 2023

I'll take a look at this today or tomorrow

@rbtcollins
Copy link
Owner Author

I apologise in advance for some of the code quality; this was implemented from necessity - I think its broadly fine and there is room to tidy it up, isolate the unsafe more etc. Just shout out if anything is unobvious (for example why X function rather than Y which is supported).

And you can find me on the rust (https://discord.gg/rust-lang) discord as lifeless if you want chat in realtime.

@Xaeroxe
Copy link
Contributor

Xaeroxe commented Feb 11, 2023

https://github.com/microsoft/windows-rs/issues/2333

Is there a reason we couldn't just create a safe shim over RtlUnicodeStringInit? Seems the major feature of the *Ex version is that it can safely accept null pointers.

@rbtcollins
Copy link
Owner Author

rbtcollins commented Feb 12, 2023

@rbtcollins
Copy link
Owner Author

(That said, I have no objection to using the non-Ex version, but we'll want to add the safety belts ourselves: since we're dealing with considerable unsafe code, I feel it is important to be as safe as possible ourselves).

@Xaeroxe
Copy link
Contributor

Xaeroxe commented Feb 12, 2023

PR up at #42

@rbtcollins
Copy link
Owner Author

Thank you, I've had a quick look.

I'm ok in principle with having local definitions as these things don't move super fast. OTOH the windows crate folk have been decently quick about the other bugs I've filed in the past, so perhaps lets get all the bugs filed and give them a week, and then if its still some undefined future time, we can merge and carry the local definitions.

@Xaeroxe
Copy link
Contributor

Xaeroxe commented Feb 12, 2023

Sounds good to me!

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

No branches or pull requests

2 participants