🔧Conditionals
Execute code that's only compiled when a condition is met.
If you have a plugin which has code that is supposed to be executed only on a specific framework, operating system, branch or even a specific Rust or Carbon protocol, you can use this system.
Framework
Since Carbon is for the most part compatible with over 95% of the plugins written for Oxide out there, you may want to use features that are only present in Carbon and not on Oxide.
It's as simple using as the following example:
Operating System
Carbon feeds the Roslyn compiler the WIN
or UNIX
compilation symbols. They work as the following:
Rust Branch
You may want to have code that gets executed only on a specific branch of Rust. If that's the case, this is how you do that:
Rust (and Carbon) Protocol
This might be the most helpful; let's say a future update of Rust or Carbon will release a new feature you'd like to use ASAP, although it'll make your plugin not compile until next update is released, but you want to publish the plugin update earlier.
You'd also want the version that implements that new logic only accessible in a future update to be within the currently released file, but want it to still compile. You can now use this:
Last updated