Husky 编程语言的平台表示
由 xiyuzhai 和 6 位贡献者 创建
#1613 in 开发工具
18KB 464 代码行
平台定义。
这定义了一个 Platform 类型,用于指定目标平台。有两种类型,一种是命名目标,如 x86_64-apple-darwin,另一种是“cfg 表达式”,如 cfg(any(target_os = "macos", target_os = "ios"))。
Platform
x86_64-apple-darwin
cfg(any(target_os = "macos", target_os = "ios"))
请参阅 examples/matches.rs 了解如何匹配 Platform 的示例。
examples/matches.rs
~0.4–1MB ~23K SLoC