If you create a library (.so) that features your custom op registration as a static variable and link that into your app, it’ll work. That’s how I did it back in 2018 and it should still work.
Best regards
Thomas