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

Regular Expression Protocol #570

Open
d-sonuga opened this issue Nov 14, 2022 · 10 comments
Open

Regular Expression Protocol #570

d-sonuga opened this issue Nov 14, 2022 · 10 comments

Comments

@d-sonuga
Copy link
Contributor

I would like to add support for the regular expression protocol, but I would like to know if I should be concerned with issue #554 and wait for its resolution before continuing.

@phip1611
Copy link
Contributor

phip1611 commented Nov 14, 2022

Additionally, just as a hint, I'd like to inform you that you might want to wait until #566 and #561 are solved/merged. Otherwise, you will run into merge conflicts.

I expect/hope that we merge those changes in the next couple of days.

@d-sonuga
Copy link
Contributor Author

Alright.
Thanks

@phip1611
Copy link
Contributor

It was not my intention that you close the issue. You can keep it open and we'd love to see a contribution soon :) @d-sonuga

@nicholasbishop
Copy link
Member

Re #554, you should feel free to go ahead and implement the protocol. I don't intend for that issue to block anyone, since we'll need to audit all the existing uses anyway.

@d-sonuga
Copy link
Contributor Author

Thanks @nicholasbishop . I'll go ahead then.

@d-sonuga
Copy link
Contributor Author

d-sonuga commented Apr 30, 2023

Hey, I implemented the protocol, but it seems like the protocol isn't supported at all.

I attempted to start testing like this:

`

info!("Running regex protocol test");
let handle = bt.find_handles::<Regex>().expect("No Regular Expression handles");
info!("Handles!: {:?}", handle);

`

When I run this, it panics with a "No Regular Expression handles". Is there another way of testing this?

@nicholasbishop
Copy link
Member

Confirmed, seems like although there's some code for the regular expressions in EDK2, it's not exposed in OVMF currently.

You could check on real hardware to see if anything you have supports it, but as far as CI goes we won't be able to test it.

That said, we can still add the protocol to uefi-rs even if we don't have a way to test it automatically yet.

@phip1611
Copy link
Contributor

phip1611 commented May 2, 2023

Unrelated question: Why would one want to use the regular expression protocol in a Rust application when there are no_std regex crates? The implementation of those is probably much more nature.

@nicholasbishop
Copy link
Member

I imagine most Rust regex crates are UTF-8, whereas this protocol uses CHAR16* strings. So using the protocol, if it were available, would potentially avoid having to convert between encodings.

@phip1611
Copy link
Contributor

phip1611 commented May 3, 2023

Ah yes, right.

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

3 participants