This repository contains shell scripts to generate MetaCall binaries for MacOS. The project automates the process of installing MetaCall as a Homebrew formula and creating a distributable package using the brew-pkg
tool.
build.sh
: Main script that orchestrates the binary generation processtest.sh
: Runs various tests against MetaCall./tests
: Includes language specific testsThis brew formulae compiles MetaCall core for ARM64 and AMD64. The installation process has been optimized to install the dependencies in a dynamic way.
Enhanced Python setup process
Refined NodeJS installation
Enhanced Metacall launcher:
The final distributable is generated using a Homebrew extension brew-pkg
. It generates a installable .pkg
and a portable .tar.gz
file. The fork includes some extra features which have been described below.
Recursive library patching: The function recursively processes linked libraries.
Dynamic linking: Uses @executable_path
to create relative paths for dynamic linking.
ELF file validation: Checks if the target binary is a valid ELF (Executable and Linkable Format) file.
Library dependency analysis: Uses otool -L
to identify linked libraries for the given binary.
Path filtering: Filters library paths to only process those within the specified prefix path.
Relative path calculation: Computes relative paths between the binary and its linked libraries.
Library path updating: Uses install_name_tool
to update library paths in the binary.
MetaCall supports ARM64
and AMD64
architectures at the moment.
Clone the repository and build MetaCall using ./build.sh
.
The script will perform the following actions:
Generated files can be found in the release
directory.
To enable/disable any loaders, modify the formulae and change the args passed to cmake.
Contributions are welcome! Please feel free to submit a Pull Request.
Please read the license here.