Last updated
Last updated
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.
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:
Carbon feeds the Roslyn compiler the WIN
or UNIX
compilation symbols. They work as the following:
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:
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:
Execute code that's only compiled when a condition is met.