Skip to content
  • Matthew Clarkson's avatar
    feat(rules_toolchain): add `:entrypoint` target to local repositories · a995bd47
    Matthew Clarkson authored
    This is important to provide a consistent target for resolving hermetic tools in repository rules.
    
    For example, one can use a local tool as so:
    
    ```py
    local(name = "echo")
    something(echo = "@echo//:entrypoint")
    ```
    
    Later, one can switch out the local entrypoint for a hermetically downloaded tool.
    
    In the future, we may provide a `toolchain_entrypoint` repository rule that provides an
    entrypoint that understands how to correctly setup `LD_LIBRARY_PATH` (and similar).
    
    This is helpful when using pre-built binaries from package repositories that are linked
    dynamically:
    
    ```py
    download_deb(name = "unionfs", ...)
    download_deb(name = "fuse", ...)
    toolchain_entrypoint(
        name = "unionfs",
        libraries = [
            "@fuse//:usr/lib/libfuse.so",
        ],
    )
    ```
    a995bd47
Loading