diff --git a/.github/jobs/GithubRelease.pkl b/.github/jobs/GithubRelease.pkl index 03f08cf63..ba1d5696f 100644 --- a/.github/jobs/GithubRelease.pkl +++ b/.github/jobs/GithubRelease.pkl @@ -34,7 +34,7 @@ fixed job { --target "${GIT_SHA}" \ --verify-tag \ --notes "Release notes: https://pkl-lang.org/main/current/release-notes/changelog.html#release-${TAG_NAME}" \ - */build/executable/* */build/distributions/* + */build/executable/* """# } } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c1fec636..84d5ea043 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1341,7 +1341,7 @@ jobs: --target "${GIT_SHA}" \ --verify-tag \ --notes "Release notes: https://pkl-lang.org/main/current/release-notes/changelog.html#release-${TAG_NAME}" \ - */build/executable/* */build/distributions/* + */build/executable/* publish-test-results: if: '!cancelled()' needs: diff --git a/docs/modules/libpkl/pages/index.adoc b/docs/modules/libpkl/pages/index.adoc index bde8e50e0..363b42742 100644 --- a/docs/modules/libpkl/pages/index.adoc +++ b/docs/modules/libpkl/pages/index.adoc @@ -7,6 +7,14 @@ It is designed to be a low-level API that interacts with Pkl via the xref:bindin It is meant to be paired with higher level logic written in a host language within the context of a Pkl language binding library. The higher level logic deals with implementing the evaluator API, and serializing/deserializing messages according to the message passing API. +== Installing libpkl + +Currently, we do not publish libpkl. +Therefore, libpkl needs to be built from source, by cloning this repository and running the steps laid out in <>. + +Once built, it can be <>, either statically or dynamically. + +[[linking-to-libpkl]] == Linking to libpkl It is possible to link to libpkl either as a static library or a dynamic library. @@ -16,50 +24,6 @@ However, this impacts the binary size of your application, as libpkl's library f On the other hand, dynamically linking to libpkl has negligible impact on binary size, but requires that end users have libpkl installed on their OS. -== Distribution - -We publish archives that contain header files, as well as both shared and static libraries. - -The distributions are published as releases on GitHub, and can be downloaded for the appropriate OS/architecture. - -The archives contain both statically linked and dynamically linked binaries for each OS. - -The archive has the following structure: - -[source] ----- -. -└── libpkl--- - ├── include - │ └── pkl.h - ├── lib - │ ├── libpkl. - │ ├── libpkl. - │ └── pkgconfig - │ ├── libpkl-static.pc - │ └── libpkl.pc - ├── LICENSE.txt - ├── README.md - └── THIRD-PARTY-NOTICES.txt ----- - -The file extensions are as follows: -|=== -|OS |Static Library Extension |Shared library extension - -|macOS -|`.a` -|`.dylib` - -|Linux -|`.a` -|`.so` - -|Windows -|`.lib` -|`.dll` -|=== - === Linking to the static vs. shared library The simplest way to configure your compiler to link to either the static or the shared library is to use https://en.wikipedia.org/wiki/Pkg-config[pkg-config]. @@ -98,6 +62,7 @@ cc -Wl,-Bstatic $(pkg-config --libs --cflags libpkl) ---- ==== +[[build-from-source]] == Building libpkl from source To build libpkl from source, the apple/pkl repository first must be cloned down to a host OS. @@ -126,6 +91,46 @@ This results in two directories of interest: Cross-compilation is not supported. +=== Distribution layout + +The built distribution archive contains both statically linked and dynamically linked binaries for each OS. + +The archive has the following structure: + +[source] +---- +. +└── libpkl--- + ├── include + │ └── pkl.h + ├── lib + │ ├── libpkl. + │ ├── libpkl. + │ └── pkgconfig + │ ├── libpkl-static.pc + │ └── libpkl.pc + ├── LICENSE.txt + ├── README.md + └── THIRD-PARTY-NOTICES.txt +---- + +The file extensions are as follows: +|=== +|OS |Static Library Extension |Shared library extension + +|macOS +|`.a` +|`.dylib` + +|Linux +|`.a` +|`.so` + +|Windows +|`.lib` +|`.dll` +|=== + == ABI compatibility libpkl is ABI compatible across Pkl versions.