mcc,
@mcc@mastodon.social avatar

Rust's "Cargo" has a feature named "Features" and a feature named "Examples" and there is a feature where an Example can use a Feature and this is incredibly, incredibly hard to google for. So far I've got as far as finding examples of Features, but not as far as finding examples of Features of Examples.

GreenSkyOverMe,
@GreenSkyOverMe@ohai.social avatar

@mcc sounds painful

mcc,
@mcc@mastodon.social avatar

@GreenSkyOverMe they seem like such well named features, so intuitive, until you have to write a search query or a sentence about them

onelson,
@onelson@mastodon.social avatar

@mcc can you elaborate on "examples can use a feature?"

cr1901,
@cr1901@mastodon.social avatar

@onelson @mcc cargo's features are the Rust equivalent of "cc -DMY_EXTRA_FUNCTIONALITY".

Cargo also provides a built-in mechanism to run code examples for your library (called, "examples" :P).

These can be combined, so that a code example requires a cargo feature to be enabled if you want to compile/run that example.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • InstantRegret
  • ngwrru68w68
  • everett
  • mdbf
  • modclub
  • rosin
  • osvaldo12
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Youngstown
  • GTA5RPClips
  • slotface
  • kavyap
  • JUstTest
  • ethstaker
  • tacticalgear
  • tester
  • cubers
  • Durango
  • normalnudes
  • khanakhh
  • Leos
  • anitta
  • cisconetworking
  • provamag3
  • megavids
  • lostlight
  • All magazines