Skip to content

perplexityai/ape

Repository files navigation

ape

A Bazel module for working with αcτµαlly pδrταblε εxεcµταblε (APE) pre-built binaries.

Getting Started

Add the following to MODULE.bazel:

bazel_dep(name = "ape", version = "0.0.0")

Binaries are provided as executable targets:

bazel run -- @ape//ape:curl --version

List the available executables:

bazel query 'kind(alias, @ape//ape:*)'

Register a binary as a toolchain for supported platforms:

load("@ape//ape/toolchain:defs.bzl", "ape_toolchain")

toolchain_type(
    name = "type",
)

ape_toolchain(
    name = "ape",
    toolchain = "@ape//toolchain/info:curl",
    toolchain_type = ":type",
)

Use a binary in a repository rule:

cosmos = use_extension("@ape//ape/cosmos:defs.bzl", "ape_cosmos")
use_repo(cosmos, "zstd")

example = use_repo_rule(":example.bzl", "example")
example(
    zstd = "@zstd",
)

Hermeticity

The module is fully hermetic, all binaries are downloaded and verified against subresource integrities.

Cosmopolitian

The project provides pre-built, hermetic Cosmopolitan pre-built binaries.

Cosmopolitan binaries work across all operating systems as explained upstream.

Binaries are built with superconfigure.

The superconfigure source code is mirrored in this repository on the superconfigure/main branch. The source contains the source code for the binaries, patches and license information.

Binaries are mirrored in the GitLab generic package registry to protect against upstream outages.

The launcher for Apple Silicon must be built from source. Zig is used to compile the launcher from source. These are both mirrored in the package registry. Source, licenses and distribution information is available at the upstream links.


About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 5