uefi-rs
uefi-rs copied to clipboard
Feature Request: Regular Expression Protocol
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.
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.
Alright. Thanks
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
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.
Thanks @nicholasbishop . I'll go ahead then.
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?
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.
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.
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.
Ah yes, right.