How to conditional compilation by a const in the crate?

⚓ Rust    📅 2025-08-31    👤 surdeus    👁️ 3      

surdeus

I am working on a little tool using Opencv. I have two envs, dev contains Opencv 4.11, and prod provides Opencv 4.6. There are some API changes between 4.11 and 4.6. And the crate opencv does provide some consts containing the version parts.

How do I compile different function calls depends on the consts?

3 posts - 2 participants

Read full topic

🏷️ Rust_feed