Faust loader: platform-aware library lookup and AQUASYNTH_FAUST_LIBRARY override #1
Loading…
Reference in a new issue
No description provided.
Delete branch "faust-loader-platform-aware"
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?
What changed
src/AquaSynth.Faust/NativeFaustRuntime.cshardcoded the Windows toolchain:faust.dll, a;PATH separator, andC:\Program Files\Faustas the default home. It could not load Faust on Linux or macOS. This branch makes the loader platform-aware. The change is commit53f1f1b. It also addstests/AquaSynth.Dsl.Tests/FaustLoaderPlatformTests.csand a paragraph indocs/faust-toolchain-boundary.md.AquaSynthFaustToolchain.LibraryFileNamesislibfaust.soon Linux,libfaust.dylibon macOS, andlibfaust.dllthenfaust.dllon Windows.FindLibrary(home)looks for these under<home>/lib.Findaccepts a home only if it has a library there andshare/faust.C:\Program Files\Faustis now Windows-only. Other platforms probe/usr/localand/usr.FaustNativeToolchain.TryLoadjoinsPATHwithPath.PathSeparator, not a literal;. The directory it prepends is the one that holds the library.AquaSynthNativeOptions.FaustLibraryPathis a new optional record parameter. TheAQUASYNTH_FAUST_LIBRARYenvironment variable does the same job. Both name the library file directly. The option wins over the variable. The override skips the home search.FaustHome, if given, suppliesshare/faust. Otherwise the prefix is the library's grandparent. Ifshare/faustis absent there, the error says so.Verification
SMOKE lines from the Linux run of this branch:
That is the loaded libfaust version, and a render of 4410 frames with peak amplitude 0.1000.
Not merged. Review requested.
Diff review: exactly three files:
src/AquaSynth.Faust/NativeFaustRuntime.cs,tests/AquaSynth.Dsl.Tests/FaustLoaderPlatformTests.cs, and the docs filedocs/faust-toolchain-boundary.md.Docs change: adds one paragraph (8 lines, no deletions) after the
AquaSynthRenderSessionnote, before## Invariants. It states that Faust library lookup is platform-aware (libfaust.soLinux,libfaust.dylibmacOS,libfaust.dllthenfaust.dllWindows, at<home>/libwith<home>/share/faustbeside it); thatAquaSynthNativeOptions.FaustLibraryPathorAQUASYNTH_FAUST_LIBRARYnames the library file directly and overrides the home search, withFaustHomesupplyingshare/faustif the prefix is not the file's grandparent; and that the loader prependslibandbintoPATHusing the platform path separator.