Skip to content

Support platform-specific package builds (or a one-time post-install hook) #249

@Bombardier-C-Kram

Description

@Bombardier-C-Kram

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:

  1. 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.

  2. 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

  1. Detects the host platform,
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions