Conversation
NagyZoltanPeter
approved these changes
Apr 15, 2026
NagyZoltanPeter
left a comment
There was a problem hiding this comment.
Oh, it's great thanks!
I just added this postinstall fix for logos-delivery-module :-D
logos-co/logos-delivery-module#5
Benchmark for c16fd32Click to view benchmark
|
Benchmark for c16fd32Click to view benchmark
|
jakubgs
approved these changes
Apr 29, 2026
Comment on lines
35
to
+41
| buildPhase = '' | ||
| export CARGO_HOME=$TMPDIR/cargo | ||
| '' + pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin '' | ||
| # Set install_name to @rpath at link time so consumers can dlopen | ||
| # librln.dylib from any location without post-build fixups. | ||
| export RUSTFLAGS="''${RUSTFLAGS:-} -C link-arg=-Wl,-install_name,@rpath/librln.dylib" | ||
| '' + '' |
Contributor
There was a problem hiding this comment.
If you grep nixpkgs you can see in most cases RUSTFLAGS is just set directly with needing previous value of RUSTFLAGS.
Suggested change
| buildPhase = '' | |
| export CARGO_HOME=$TMPDIR/cargo | |
| '' + pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin '' | |
| # Set install_name to @rpath at link time so consumers can dlopen | |
| # librln.dylib from any location without post-build fixups. | |
| export RUSTFLAGS="''${RUSTFLAGS:-} -C link-arg=-Wl,-install_name,@rpath/librln.dylib" | |
| '' + '' | |
| # Set install_name to @rpath at link time so consumers can dlopen | |
| # librln.dylib from any location without post-build fixups. | |
| env.RUSTFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-C link-arg=-Wl,-install_name,@rpath/librln.dylib"; | |
| buildPhase = '' | |
| export CARGO_HOME=$TMPDIR/cargo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
To fix:
Changes
Pass
-Wl,-install_name,@rpath/librln.dylibviaRUSTFLAGSduring the Cargo build so the correct relocatable reference is set at link time. Linux is unaffectedTesting
nix buildon macOS produceslibrln.dylibwith@rpath/librln.dylibas install_nameotool -L $out/lib/librln.dylibshows@rpath/librln.dylibPR Lifecycle
Important
Draft PRs signal that work is still in progress and will not trigger CI.
Only mark your PR as Ready for review when you believe it is complete.
All CI checks must pass before requesting a review.
Code Guidelines
Please keep the following in mind (see CONTRIBUTING.md for full details):
Commits
feat(rln):,fix(utils):,chore:, etc.)rln,rln-cli,rln-wasm,utils,ciError Handling
unwrap(),expect(), orpanic!()in production paths inside
rln/src/orutils/src/.The only acceptable exception is an internal invariant that is statically guaranteed - and even then, prefer returning an error.
thiserror-based error types (RLNError,ProtocolError,UtilsError, etc.)and propagate errors with
?.InsufficientData { expected, actual }).unwrap()is fine in tests.Code Style
cargo make fmtat the root of the repository to auto-format the entire codebase with rules defined inrustfmt.toml.cargo make fmt_checkto verify formatting (CI enforces this on stable).rustfmt.toml).pub(crate)for items that should not be part of the public API.Zeroize/ZeroizeOnDropto any struct holding secret material.Linting (mirrors CI)
CI runs clippy across multiple crate/feature combinations. Run the relevant checks locally before pushing:
At minimum, run the default-features check. If your changes touch
statelessorrln-wasm, run those checks as well.Checklist
cargo +nightly fmt --allto apply allrustfmt.tomlrules (including import grouping)cargo fmt --all -- --checkproduces no changesmake testpasses locallyunwrap()/expect()/panic!()in library coderun-coveragelabel to enable it