!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

126 Members
24 Servers

Load older messages


SenderMessageTime
7 Dec 2024
@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
@6pak:matrix.org6pakit gets cached afaik23:32:21
@gggkiller:matrix.orgGGGthough I guess then the blame is on the dev23:32:23
@6pak:matrix.org6pakbut it might get cached by the file path returned from the resolver23:32:43
@6pak:matrix.org6pak * but it might get cached on the file path returned from the resolver23:32:47
@gggkiller:matrix.orgGGGI think this is just me worrying about an issue that doesn't exist honestly23:33:01
@gggkiller:matrix.orgGGGwouldn't worry about it for now23:33:11
@gggkiller:matrix.orgGGGyou'd need a really massive number of libraries to actually get a performance hit from a linear search23:33:33
@6pak:matrix.org6pakI bet the ffi stub for dlopen will take more time than iterating 100 strings in the array23:33:46
@gggkiller:matrix.orgGGGyeah, it's probably a non-issue23:34:02
@6pak:matrix.org6pakI'd be down to write it23:35:53
@6pak:matrix.org6pakso the most important question: whats the name23:36:06
@gggkiller:matrix.orgGGG patchcil 23:43:02
@gggkiller:matrix.orgGGGis what I was gonna call it23:43:06

Show newer messages


Back to Room ListRoom Version: 9