-
-
Notifications
You must be signed in to change notification settings - Fork 30
.NET 바인딩 추가 #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET 바인딩 추가 #130
Conversation
- C ABI 형태로 Rust Interface 노출 (packages/dotnet/src/lib.rs) - lib.rs 파일을 .NET Class Library로 Import (packages/dotnet/Braillify/NativeMethods.cs) - 멀티 타기팅 (여러 .NET 플랫폼 대상) 형태로 작성 - Xunit 유닛 테스트 작성 (.NET Core 3.1, .NET 5, .NET 6, .NET 7, .NET 8, .NET 9, .NET 10) - .NET Standard 2.0은 .NET Framework 4.7.2 기반의 MSTest 사용
dnx로 실행할 CLI 프로젝트를 Braillify로 수정 Braillify를 Wrapping 하는 라이브러리는 Braillify.Net으로 수정
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Changepacks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 dll 파일은 gitignore 되어야 하는 것 아닌지 문의드립니다 (각 플랫폼 마다 별도로 생성되어야 하는 것으로 보입니다.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 그렇습니다. 테스트하다가 빼먹었나보네요 ㅎㅎ... 다시 업데이트 하겠습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵, 감사합니다!
주신 구조를 기반으로 changepacks 가 C#을 지원하도록 업데이트 하여 매끄럽게 C#프로젝트도 배포가 될 수 있도록 하겠습니다.
기여 정말 감사드립니다.
각각의 OS + Architecture 별로 각각 빌드해서 이용해야 함.
개요
Rust 기반 Braillify 라이브러리의 .NET 바인딩을 추가합니다. FFI/P/Invoke를 통해 네이티브 Rust 라이브러리를 .NET에서 사용할 수 있습니다.
NuGet 패키지
BraillifyNetBraillify지원 플랫폼
주요 구현
프로젝트 구조
버전별 P/Invoke 구현 차이
네이티브 라이브러리 로딩
NativeLibrary.SetDllImportResolver사용AppContext.BaseDirectory사용 (NativeAOT 호환)runtimes/{rid}/native/{lib}CLI 사용법
라이브러리 사용법
테스트 결과
모든 72개 테스트 통과 (8개 프레임워크 × 9개 테스트)
빌드 명령어
🤖 Generated with Claude Code