Depending on your application, how your devices are set up and what you are expecting. There might be a way of using the “libgpiod”. If you follow the link below you can see some lines mentioning gpiod_line_request_rising_edge_events.
Depending on the latency which you are expecting this might be a viable option. If latency is very important for your project, we would need to know a bit more about your project, expectation, and setup.