Add support for DOTNET Facade FFI#320
Open
TekuSP wants to merge 5 commits intoFrameworkComputer:mainfrom
Open
Conversation
- Introduce a new crate that exposes C-compatible functions for interacting with the EC and SMBIOS. - Integrate `csbindgen` to automatically generate C# bindings during the build process. - Implement helper types and snapshot functions in `framework_lib` to facilitate structured data retrieval. - Export functionality for platform identification, battery status, and thermal/fan control.
- Add build steps for the .NET interop crate to FreeBSD, Linux, and Windows CI jobs. - Configure CI to upload compiled native libraries and generated C# bindings as build artifacts. - Update README with build instructions and technical details for the optional .NET interop functionality.
Author
|
(And yes I did use Copilot for some tasks, as I have absolutely almost zero knowledge of RUST, I have knowledge of firmwares, OS, and frameworks in .NET (Yes we had C# OS)) |
Author
|
All tests pass and library works on my laptop, there is one slight formatting change (Cause meh Lint) and one extended helper in original source code for getting some internal values. No changes made to RUST functionality (I hope), just exported a lot of stuff for C (And C#) |
Signed-off-by: TekuSP <richard.torhan@windowslive.com>
Author
|
Signed commit. |
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.
Hello,
I am .NET Developer and not RUST Developer, this is warning of things to come.
I needed to integrate Framework-System into .NET ecosystem, using export "c" of RUST.
I have no idea if I have done this right, but I tried my best.
I made .NET integration library of other side here: https://github.com/TekuSP/framework-dotnet
With GIT Submodule, sample output of my test console app is:
Therefore even if my solution is bad, it works. It would be silly and stupid of me to not push this idea upstream, maybe someone will do it better, maybe someone has better solution. But this is for me only way to access Framework-System from .NET.
I did in the past app for cooling fans of MSI, want to port that for my Framework, including separate fan curves and control.