Class RustLibrary

    • Method Detail

      • getLinkerArg

        public abstract Arg getLinkerArg​(boolean direct,
                                         boolean isCheck,
                                         com.facebook.buck.features.rust.RustPlatform rustPlatform,
                                         Linker.LinkableDepType depType,
                                         Optional<String> alias)
        Return Arg for dependency.
        Parameters:
        direct - true for direct dependency, false for transitive
        isCheck - true if we're generated check builds
        rustPlatform - Current platform we're building for.
        depType - What kind of linkage we want with the dependency.
        alias -
        Returns:
        Arg for linking dependency.
      • getBuildTarget

        public abstract BuildTarget getBuildTarget()
        Return BuildTarget for linkable
        Returns:
        BuildTarget for linkable.
      • getRustSharedLibraries

        public abstract com.google.common.collect.ImmutableMap<String,​SourcePath> getRustSharedLibraries​(com.facebook.buck.features.rust.RustPlatform rustPlatform)
        Return a map of shared libraries this linkable produces (typically just one)
        Parameters:
        rustPlatform - the platform we're generating the shared library for
        Returns:
        Map of soname -> source path
      • getRustLinakbleDeps

        public abstract Iterable<BuildRule> getRustLinakbleDeps​(com.facebook.buck.features.rust.RustPlatform rustPlatform)
        Returns:
        the dependencies of this RustLinkable.
      • getPreferredLinkage

        public abstract NativeLinkableGroup.Linkage getPreferredLinkage()
        Return the linkage style for this linkable.
        Returns:
        Linkage mode.
      • isProcMacro

        public abstract boolean isProcMacro()
        Return true if this is a compiler plugin