Cache native libe_sqlite3.so install into Eco's apphost dir #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-05-18T06:45:38Z - https://github.com/coilysiren/eco-replay/issues/2
Problem
Eco's mod loader uses
AssemblyLoadContext.Default.LoadFromStream, which doesn't add the mod folder to .NET's native-library search path. So whenMicrosoft.Data.SqliteP/Invokese_sqlite3, the runtime looks in Eco's apphost extraction dir (e.g.~/.net/EcoServer/<hash>/) and not inMods/EcoReplay/.Current workaround: manual symlink:
The hash
oXJfcCrti-5Iis stable per Eco-binary build but resets when Eco updates.Next steps
install-modstep (Makefile target) that re-symlinks after every install/Eco-update.Microsoft.Data.Sqlitein favor of a pure-managed SQLite (e.g.dotnet/runtime's built-inSystem.Data.SQLiteonce a Linux-native build is in the chain — see the work already done in /tmp during overnight session to buildlibSQLite.Interop.sofrom SDS 1.0.119 source).SetDllImportResolvermore aggressively, called from a module-initializer instead of fromInitialize()so it fires before any other code touchesMicrosoft.Data.Sqlite. The current resolver code is wired up but Eco's pre-init reflection scan likely triggersSqliteConnection's static cctor before my plugin'sInitializeruns.