test(ffi): run .NET binding tests on net48 and debug native builds - #539
Draft
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 3 commits into
Draft
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 3 commits into
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 3 commits into
Conversation
Debug builds tripped std's precondition checks at the FFI boundary with the old Diplomat fork, so only release was tested. They pass with the new bindings, and debug is the build that runs those checks. Also drop the note about removing netstandard2.0 together with the old fork: the new backend marshals fine on .NET Framework. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The shipped netstandard2.0 assembly also loads on .NET Framework, where by-value Result structs used to break. Compile the generated sources against net48 and check each shape that crosses the boundary: object, void, scalar and string Results, Option returns, enums, the error arm, and the hand-written byte[] addons. Runs in CI and through `just test`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
irvingouj@Devolutions (irvingoujAtDevolution)
added this pull request to stack #540
September 29, 2026 18:56
The Gateway PowerShell module is the one shipping consumer that loads Devolutions.Picky on .NET Framework (Windows PowerShell 5.1). Add net48 tests for what it actually calls: PFX parsing + the SafeBag iterator, Cert.FromDer, PrivateKey.FromPkcs8 and GenerateRsa(nuint). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Top of the Diplomat devo.2 stack (#536):
dotnet-testsruns against both debug and release native builds. Debug keeps Rust's std precondition checks on, which is where FFI mistakes show up.Devolutions.Picky.Net48Tests: 17 marshalling tests on .NET Framework 4.8 (strings, results, enums, errors, disposal, iterators), wired into CI andjust test.Cert.FromDer/PrivateKey.FromPkcs8,GenerateRsa(2048).Tested: 26/26 on debug and release, 17/17 on net48 against both native builds locally.