Documentation

Lake.Build.Facets

Simple Builtin Facet Declarations #

This module contains the definitions of most of the builtin facets. The others are defined Build.Info. The facets there require configuration definitions (e.g., Module), and some of the facets here are used in said definitions.

Module Facets #

structure Lake.ModuleFacet (α : Type) :

A module facet name along with proof of its data type.

  • name : Lean.Name

    The name of the module facet.

  • data_eq : FacetOut self.name = α

    Proof that module's facet build result is of type α.

Instances For
    def Lake.instReprModuleFacet.repr {α✝ : Type} [Repr α✝] :
    ModuleFacet α✝NatStd.Format
    Instances For
      @[implicit_reducible]
      instance Lake.instReprModuleFacet {α✝ : Type} [Repr α✝] :
      @[implicit_reducible]
      @[reducible]

      The module's Lean source file.

      Instances For
        @[reducible]

        The parsed module header of the module's source file.

        Instances For
          @[reducible]

          The computed configuration of a module for Lean.

          In the process, this facet will build all of a module's dependencies, including transitive imports, plugins, and those specified by needs.

          Instances For
            @[reducible]

            This facet builds all of a module's dependencies, including transitive imports, plugins, and those specified by needs.

            Instances For
              @[simp]

              Information about the imports of a module.

              • Artifacts directly needed for the imports of the module.

              • trace : BuildTrace

                The trace produced by mixing the traces of directArts with their transitive imports.

              • transTrace : BuildTrace

                Transitive import trace for an import of the module with the module system enabled.

              • metaTransTrace : BuildTrace

                Transitive import trace for a meta import of the module.

              • allTransTrace : BuildTrace

                Transitive import trace for an import all of the module.

              • legacyTransTrace : BuildTrace

                Transitive import trace for an import of the module without the module system enabled.

              Instances For
                @[reducible]

                For internal use only. Information about the imports of this module.

                Instances For

                  Information useful to importers of a module.

                  • srcTrace : BuildTrace

                    The trace of the module's source file.

                  • Artifacts directly needed for an import of the module with the module system enabled.

                  • artsTrace : BuildTrace

                    The trace of the module's public olean.

                  • metaArtsTrace : BuildTrace

                    The trace of the module's public olean and IR.

                  • Artifacts directly needed for an import of the module from a module without the module system enabled or import all of the module from a module with it enabled.

                  • allArtsTrace : BuildTrace

                    The trace produced by mixing the traces of allArts.

                  • transTrace : BuildTrace

                    Transitive import trace for an import of the module with the module system enabled.

                  • metaTransTrace : BuildTrace

                    Transitive import trace for a meta import of the module.

                  • allTransTrace : BuildTrace

                    Transitive import trace for an import all of the module.

                  • legacyTransTrace : BuildTrace

                    Transitive import trace for an import of the module without the module system enabled.

                  Instances For
                    @[reducible]

                    For internal use only. Information useful to importers of this module.

                    Instances For
                      @[reducible]

                      Artifacts directly needed for an import of this module with the module system enabled.

                      Instances For
                        @[reducible]

                        Artifacts directly needed for an import of this module from a module without the module system enabled or import all of this module from a module with it enabled.

                        Instances For
                          @[reducible]

                          The core build facet of a Lean file. Elaborates the Lean file via lean and produces all the Lean artifacts of the module (e.g., olean, ilean, c). Its trace just includes its dependencies.

                          Instances For
                            @[reducible]

                            The olean file produced by lean.

                            Instances For
                              @[reducible]

                              The olean.server file produced by lean (with the module system enabled).

                              Instances For
                                @[reducible]

                                The olean.private file produced by lean (with the module system enabled).

                                Instances For
                                  @[reducible]

                                  The ilean file produced by lean.

                                  Instances For
                                    @[reducible]

                                    The ir file produced by lean (with the module system enabled).

                                    Instances For
                                      @[reducible]

                                      The C file produced by lean.

                                      Instances For
                                        @[reducible]

                                        The LLVM bitcode (bc) file produced by lean.

                                        Instances For
                                          @[reducible]

                                          The object file .c.o built from c. On Windows, this is c.o.noexport, on other systems it is c.o.export).

                                          Instances For
                                            @[reducible]

                                            The object file .c.o.export built from c (with -DLEAN_EXPORTING).

                                            Instances For
                                              @[reducible]

                                              The object file .c.o.noexport built from c (without -DLEAN_EXPORTING).

                                              Instances For
                                                @[reducible]

                                                The object file .bc.o built from bc.

                                                Instances For
                                                  @[reducible]

                                                  The object file built from c/bc. On Windows with the C backend, no Lean symbols are exported. On every other configuration, symbols are exported.

                                                  Instances For
                                                    @[reducible]

                                                    The object file built from c/bc (with Lean symbols exported).

                                                    Instances For
                                                      @[reducible]

                                                      The object file built from c/bc (without Lean symbols exported).

                                                      Instances For

                                                        Package Facets #

                                                        @[reducible]

                                                        A package's optional cached build archive (e.g., from Reservoir or GitHub). Will NOT cause the whole build to fail if the archive cannot be fetched.

                                                        Instances For
                                                          @[simp]
                                                          @[simp]
                                                          @[reducible]

                                                          A package's cached build archive (e.g., from Reservoir or GitHub). Will cause the whole build to fail if the archive cannot be fetched.

                                                          Instances For
                                                            @[simp]
                                                            @[reducible]

                                                            A package's optional build archive from Reservoir. Will NOT cause the whole build to fail if the barrel cannot be fetched.

                                                            Instances For
                                                              @[simp]
                                                              @[reducible]

                                                              A package's Reservoir build archive from Reservoir. Will cause the whole build to fail if the barrel cannot be fetched.

                                                              Instances For
                                                                @[reducible]

                                                                A package's optional build archive from a GitHub release. Will NOT cause the whole build to fail if the release cannot be fetched.

                                                                Instances For
                                                                  @[simp]
                                                                  axiom Lake.FacetOut.package.optRelease :
                                                                  FacetOut `package.optRelease = Bool
                                                                  @[reducible]

                                                                  A package's build archive from a GitHub release. Will cause the whole build to fail if the release cannot be fetched.

                                                                  Instances For
                                                                    @[simp]
                                                                    @[simp]
                                                                    @[reducible]

                                                                    A package's extraDepTargets mixed with its transitive dependencies'.

                                                                    Instances For

                                                                      Target Facets #

                                                                      @[reducible]

                                                                      The library's default facets (as specified by its defaultFacets configuration). .

                                                                      Instances For
                                                                        @[simp]
                                                                        @[simp]
                                                                        @[reducible]

                                                                        A Lean library's Lean artifacts (e.g., olean, ilean, c).

                                                                        Instances For
                                                                          @[reducible]

                                                                          A Lean library's static artifact.

                                                                          Instances For
                                                                            @[reducible]

                                                                            A Lean library's static artifact (with exported symbols).

                                                                            Static libraries with explicit exports are built as thin libraries. Such libraries are usually used as part of the local build process of some shared artifact and not publicly distributed. Standard static libraries are much better for distribution.

                                                                            Instances For
                                                                              @[simp]
                                                                              @[reducible]

                                                                              A Lean library's shared artifact.

                                                                              Instances For
                                                                                @[reducible]

                                                                                A Lean library's extraDepTargets mixed with its package's.

                                                                                Instances For
                                                                                  @[simp]
                                                                                  @[reducible]

                                                                                  The executable's default facet (i.e., an alias for exe)

                                                                                  Instances For
                                                                                    @[reducible]

                                                                                    A Lean binary executable.

                                                                                    Instances For
                                                                                      @[reducible]

                                                                                      The external library's default facet (i.e., an alias for static)

                                                                                      Instances For
                                                                                        @[reducible]

                                                                                        A external library's static binary.

                                                                                        Instances For
                                                                                          @[reducible]

                                                                                          A external library's shared binary.

                                                                                          Instances For
                                                                                            @[simp]
                                                                                            @[reducible]

                                                                                            A external library's dynlib.

                                                                                            Instances For
                                                                                              @[reducible]

                                                                                              The default facet for an input file. Produces the file path.

                                                                                              Instances For
                                                                                                @[reducible]

                                                                                                The default facet for an input directory. Produces the matching files in the directory.

                                                                                                Instances For