| 7 Dec 2024 |
6pak | you need to iterate over every method to find DllImport attributes anyway | 23:30:53 |
GGG | though that should only matter for big stuff like game engines | 23:30:56 |
GGG | yeah, but that's compile time, not runtime | 23:31:05 |
GGG | I'm worried about possible performance impacts to applications running in nixos | 23:31:17 |
GGG | and those would be very hard to debug since we'd be "invisibly" (to the end user) adding stuff to the code | 23:31:39 |
6pak | I mean isn't that how dynamic linker works in native land | 23:31:46 |
GGG | * 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 code | 23:31:49 |
GGG | well, it loads stuff up on boot | 23:32:00 |
GGG | nothing prevents someone from calling NativeLibrary.Load multiple times | 23:32:12 |
GGG | as dumb as that would be | 23:32:15 |
6pak | it gets cached afaik | 23:32:21 |
GGG | though I guess then the blame is on the dev | 23:32:23 |
6pak | but it might get cached by the file path returned from the resolver | 23:32:43 |
6pak | * but it might get cached on the file path returned from the resolver | 23:32:47 |
GGG | I think this is just me worrying about an issue that doesn't exist honestly | 23:33:01 |
GGG | wouldn't worry about it for now | 23:33:11 |
GGG | you'd need a really massive number of libraries to actually get a performance hit from a linear search | 23:33:33 |
6pak | I bet the ffi stub for dlopen will take more time than iterating 100 strings in the array | 23:33:46 |
GGG | yeah, it's probably a non-issue | 23:34:02 |
6pak | I'd be down to write it | 23:35:53 |
6pak | so the most important question: whats the name | 23:36:06 |
GGG | patchcil | 23:43:02 |
GGG | is what I was gonna call it | 23:43:06 |
GGG | what do you have in mind? I was planning to use Mono.Cecil | 23:43:55 |
6pak | AsmResolver > cecil | 23:46:37 |
6pak | is there anything in nixpkgs that dynamically loads native libraries? | 23:54:14 |
GGG | well, there are a few native tools that dynamically load native libs | 23:54:36 |
6pak | I mean C# apps | 23:54:47 |
GGG | I'm not sure, but dotnet itself already does | 23:55:04 |
6pak | in the C++ part of the runtime though | 23:55:52 |