!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

127 Members
23 Servers

Load older messages


SenderMessageTime
7 Dec 2024
@gggkiller:matrix.orgGGGremove things that aren't being used23:25:56
@gggkiller:matrix.orgGGGalthough I guess the ideal would be to just not add them in the first place23:26:08
@6pak:matrix.org6pak^23:26:14
@gggkiller:matrix.orgGGG I'm thinking too much of just implementing patchelf for CIL and not thinking too much about the differences 😅 23:26:24
@6pak:matrix.org6pakI thought the use case for --shrink-rpath is only when you get precompiled binaries which already have some rpath23:26:40
@6pak:matrix.org6pakwhen you build yourself you can just not add stuff you don't need23:26:51
@gggkiller:matrix.orgGGG pretty much, or when you just call --add-rpath with the same library set for all ELFs in $out and then want to clean everything up 23:27:18
@gggkiller:matrix.orgGGG say you don't want to have to figure out which libraries each binary needs, so you just do mass patchelf --set-rpath "$RPATH" "$file"; patchelf --shrink-rpath "$file"; 23:27:52
@gggkiller:matrix.orgGGGwhich could also happen in our case I guess23:28:38
@6pak:matrix.org6pakwe could have our own "fake" --add-needed though23:28:54
@gggkiller:matrix.orgGGGhow would we manage that though23:29:02
@gggkiller:matrix.orgGGGresource files?23:29:04
@gggkiller:matrix.orgGGG * resource files/strings?23:29:09
@6pak:matrix.org6pakwe have to inject DllImportResolver in some way anyway23:29:18
@6pak:matrix.org6pak so I thought of making a <NixInitClassWhatever> with a ModuleInitializer method in it 23:29:35
@6pak:matrix.org6pakmight aswell add a static string[] Needed property to it23:29:45
@gggkiller:matrix.orgGGGyeah, we can do that, but I'd like a way to manage stuff without needing to decompile code23:29:52
@gggkiller:matrix.orgGGGI guess having a static readonly array could work23:30:02
@gggkiller:matrix.orgGGGbut that wouldn't be very efficient since we'd need to linearly iterate through it23:30:17
@6pak:matrix.org6pakeh23:30:45
@6pak:matrix.org6pakyou need to iterate over every method to find DllImport attributes anyway23:30:53
@gggkiller:matrix.orgGGGthough that should only matter for big stuff like game engines23:30:56
@gggkiller:matrix.orgGGG yeah, but that's compile time, not runtime 23:31:05
@gggkiller:matrix.orgGGGI'm worried about possible performance impacts to applications running in nixos23:31:17
@gggkiller:matrix.orgGGGand those would be very hard to debug since we'd be "invisibly" (to the end user) adding stuff to the code23:31:39
@6pak:matrix.org6pakI mean isn't that how dynamic linker works in native land23:31:46
@gggkiller:matrix.orgGGG * and those would be very hard to debug since we'd be "invisibly" (to the end user and original package maintainers) adding stuff to the code23:31:49
@gggkiller:matrix.orgGGGwell, it loads stuff up on boot23:32:00
@gggkiller:matrix.orgGGG nothing prevents someone from calling NativeLibrary.Load multiple times 23:32:12
@gggkiller:matrix.orgGGGas dumb as that would be23:32:15

Show newer messages


Back to Room ListRoom Version: 9