square / square/zstd-kmp

Library loading does not work for sandboxed apps

Open
#153 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
122
Forks
7
PR merge metrics
No merged PRs in 30d

Description

To publish a macos app to the AppStore, all native libs must be signed as well and therefore NOT loaded from the jar but added separately (https://kotlinlang.org/docs/multiplatform/compose-native-distribution.html#adding-files-to-packaged-application). Nucleus already strips the libs from jars, signs and puts them into an accessible location. loadNativeLibrary can then no longer find the required files.

Would it be possible to provide an override (like here) so I can load the library myself?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in zstd-kmp/src/jvmMain/kotlin/com/squareup/zstd/JvmZstd.kt at loadNativeLibrary and compare its behavior with NativeBuildsJvmLoader.kt around line 38. Determine how an application-provided native-library location can be exposed without breaking the existing lookup. Done means sandboxed macOS apps can supply and load their separately signed library.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, macos
Domain
desktop-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.