Skip to main content
Bazel
Bazel 简介 使用入门 用户指南 参考文档 扩展 社区 带版本号的文档
  • 8.4
  • 8.3
  • 8.2
  • 8.1
  • 8.0
  • 7.6
  • 6.5
  • 5.4.1
  • 每晚
  • 更多…
/
  • English
  • Deutsch
  • Español
  • Français
  • Indonesia
  • Italiano
  • Polski
  • Português
  • Tiếng Việt
  • Türkçe
  • Русский
  • עברית
  • العربيّة
  • فارسی
  • हिंदी
  • বাংলা
  • ภาษาไทย
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어
GitHub
  • 通过高级概念和扩展程序最大限度提升 Bazel’s 能力的指南
概念 编写规则 分发规则 API
Bazel
  • Bazel 简介
  • 使用入门
  • 用户指南
  • 参考文档
  • 扩展
    • 概念
    • 编写规则
    • 分发规则
    • API
  • 社区
  • 带版本号的文档
    • More
  • GitHub
  • Build API
    • 概览
    • 全局函数
      • 概览
      • .bzl 文件
      • 所有 Bazel 文件
      • 构建文件
      • MODULE.bazel 文件
      • REPO.bazel 文件
      • VENDOR.bazel 文件
      • WORKSPACE 文件
    • 配置 Fragment
      • 概览
      • 苹果
      • bazel_android
      • Bazel_py
      • 承保范围
      • CPP
      • J2OBJC
      • Java
      • OBJC
      • 平台
      • 原型
      • py
    • 提供方
      • 概览
      • AnalysisTestResultInfo
      • 抄送信息
      • CcToolchainConfigInfo
      • CctoolchainInfo
      • ConstraintCollection
      • ConstraintSettingInfo
      • ConstraintValueInfo
      • 调试软件包信息
      • 默认信息
      • ExecutionInfo
      • 功能标志信息
      • file_provider
      • FilesToRunProvider
      • 不兼容的 ProviderProvider
      • InstrumentedFilesInfo
      • java_compile_info
      • java_output_jars 中
      • JavaRuntimeInfo
      • JavaToolchainInfo
      • ObjcProvider
      • 输出组信息
      • PackageSpecificationInfo
      • 平台信息
      • ProGuard 规范提供程序
      • ProtoRegistry 提供程序
      • 运行环境信息
      • 模板变量信息
      • 工具链信息
      • 工具链类型信息
    • 内置类型
      • 概览
      • 操作
      • 操作
      • Apple_Platform
      • 参数
      • 式
      • Attribute
      • bazel_module
      • bazel_module_tags 标签
      • 构建设置
      • CcCompilationOutput
      • CcLinkingOutput
      • CompilationContext
      • configuration
      • 计数器
      • 偏移
      • DirectoryExpander
      • 点版本
      • exec_result
      • ExecGroupCollection
      • 外部群组上下文
      • ExecTransitionFactory 类
      • extension_metadata
      • 功能配置
      • 文件
      • fragment
      • java_annotation_processing
      • 标签
      • 延迟绑定默认值
      • 库链接
      • 许可
      • 链接器输入
      • 关联上下文
      • 微距
      • mapped_root
      • module_ctx
      • path
      • Provider
      • repo_metadata
      • 代码库 ctx
      • 代码库代码库
      • 代码库规则
      • 根
      • 规则
      • 规则属性
      • Runfile
      • struct
      • 子规则
      • subrule_ctx
      • 符号链接条目
      • tag_class [标记类]
      • 目标
      • 模板 Dict
      • toolchain_type
      • 工具链上下文
      • 过渡
      • wasm_exec_result
      • wasm_module
    • 顶级模块
      • 概览
      • apple_common
      • 属性
      • cc_common
      • config
      • config_common
      • 覆盖率
      • java_common
      • 本国的/原生的/土著
      • platform_common
      • 原型
      • proto_common
      • 测试
    • Starlark 核心数据类型
      • 概览
      • bool
      • 内置函数或方法
      • 字典
      • float
      • 函数
      • int
      • json
      • list
      • 范围
      • set
      • 字符串
      • tuple
    • 代码库规则
      • 概览
      • git
      • http
      • 局部
      • utils
  • 8.4
  • 8.3
  • 8.2
  • 8.1
  • 8.0
  • 7.6
  • 6.5
  • 5.4.1
  • 每晚
  • 更多…
BazelCon 2025 registration and CFP are open now!
  • Bazel
  • 扩展
  • API

function
Stay organized with collections Save and categorize content based on your preferences.

Report an issueopen_in_new View sourceopen_in_new Nightly · 8.4 · 8.3 · 8.2 · 8.1 · 8.0 · 7.6

The type of functions declared in Starlark.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-09-04 UTC.

  • Stay connected

    • Blog
    • GitHub
  • Support

    • Support
    • Issue tracker
    • Slack
    • Stack Overflow
  • Terms
  • Privacy
  • Manage cookies
  • English
  • Deutsch
  • Español
  • Français
  • Indonesia
  • Italiano
  • Polski
  • Português
  • Tiếng Việt
  • Türkçe
  • Русский
  • עברית
  • العربيّة
  • فارسی
  • हिंदी
  • বাংলা
  • ภาษาไทย
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어