Background
When building a Tatin package that ships native libraries (e.g. raylibAPL), each target platform can sometimes need its own shared objects / DLLs.
Today a package author has only two (not necessarily satisfactory) choices:
-
Bundle the binaries for every supported platform inside the same package. This results in a much larger package and forces every user to download artefacts they will never use.
-
Defer the download of the correct binaries until the first LoadPackage at run time, using ⎕LX as a workaround. The hook is executed on every load, not once after install. Complicates user code and could noticeably slow down package start-up.
Request
Add first-class support for platform specificity at the package-manager level.
Possible directions (either one of these would help):
A. Multiple platform-tagged builds under the same semantic version
- e.g.
raylibAPL-1.2.3-win64
raylibAPL-1.2.3-linux64
raylibAPL-1.2.3-macos
- The package manager chooses the build whose tag matches the platform.
B. A one-time post-install hook defined in apl-package.json
- Runs immediately after the package has been unpacked.
- Guarantees to run only once per install/upgrade, not on every load.
- Could be used to download or build native artefacts dynamically.
Work-around today
Use a ⎕LX expression that
- Detects the host platform,
- Downloads / extracts the correct library if it is missing,
This works but is executed on every package load, which may not be needed, or wanted.
Background
When building a Tatin package that ships native libraries (e.g. raylibAPL), each target platform can sometimes need its own shared objects / DLLs.
Today a package author has only two (not necessarily satisfactory) choices:
Bundle the binaries for every supported platform inside the same package. This results in a much larger package and forces every user to download artefacts they will never use.
Defer the download of the correct binaries until the first
LoadPackageat run time, using⎕LXas a workaround. The hook is executed on every load, not once after install. Complicates user code and could noticeably slow down package start-up.Request
Add first-class support for platform specificity at the package-manager level.
Possible directions (either one of these would help):
A. Multiple platform-tagged builds under the same semantic version
raylibAPL-1.2.3-win64
raylibAPL-1.2.3-linux64
raylibAPL-1.2.3-macos
B. A one-time post-install hook defined in
apl-package.jsonWork-around today
Use a
⎕LXexpression thatThis works but is executed on every package load, which may not be needed, or wanted.