Code Monkey home page Code Monkey logo

xpl0itr / libopenmpt.net Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 15 KB

A mostly source-generated, blittable bindings library wrapping libopenmpt using ClangSharp's PInvokeGenerator and csbindgen's GroupedNativeMethodsGenerator, targeting .NET 8.0 and .NET Standard 2.0.

Home Page: https://lib.openmpt.org/doc/group__libopenmpt__c.html

License: Mozilla Public License 2.0

C# 100.00%
bindings dotnet libopenmpt openmpt pinvoke source-generation

libopenmpt.net's Introduction

LibOpenMPT.NET

A mostly source-generated, blittable bindings library wrapping libopenmpt using ClangSharp's PInvokeGenerator and csbindgen's GroupedNativeMethodsGenerator, targeting .NET 8.0 and .NET Standard 2.0.

Native libraries

By default, the included native libraries are copied to the build output directory, to disable this, add ExcludeAssets="native" to the PackageReference in your csproj.

The nuget package only includes native libraries for Windows x64, packages for other platforms can be found on the OpenMPT wiki.

Building

Essentially just replicate the CI instructions.

Licensing

This project is subject to the terms of the Mozilla Public License, v. 2.0.

libopenmpt.net's People

Contributors

xpl0itr avatar

Watchers

 avatar

libopenmpt.net's Issues

Compiler Warning CS0612

The compiler emits the following warnings:

Warning: D:\a\LibOpenMPT.NET\LibOpenMPT.NET\source\GroupedNativeMethodsGenerator\GroupedNativeMethodsGenerator.GroupedNativeMethodsGenerator\LibOpenMPT.NET.NativeMethods.GroupedNativeMethods.g.cs(177,20): warning CS0612: 'NativeMethods.module_get_current_tempo(Module*)' is obsolete [D:\a\LibOpenMPT.NET\LibOpenMPT.NET\source\LibOpenMPT.NET.csproj]
Warning: D:\a\LibOpenMPT.NET\LibOpenMPT.NET\source\GroupedNativeMethodsGenerator\GroupedNativeMethodsGenerator.GroupedNativeMethodsGenerator\LibOpenMPT.NET.NativeMethods.GroupedNativeMethods.g.cs(332,20): warning CS0612: 'NativeMethods.module_ctl_get(Module*, sbyte*)' is obsolete [D:\a\LibOpenMPT.NET\LibOpenMPT.NET\source\LibOpenMPT.NET.csproj]
Warning: D:\a\LibOpenMPT.NET\LibOpenMPT.NET\source\GroupedNativeMethodsGenerator\GroupedNativeMethodsGenerator.GroupedNativeMethodsGenerator\LibOpenMPT.NET.NativeMethods.GroupedNativeMethods.g.cs(357,20): warning CS0612: 'NativeMethods.module_ctl_set(Module*, sbyte*, sbyte*)' is obsolete [D:\a\LibOpenMPT.NET\LibOpenMPT.NET\source\LibOpenMPT.NET.csproj]

This is because ClangSharpPInvokeGenerator correctly adds ObsoleteAttribute to binding methods where the C header marks the method as deprecated, but GroupedNativeMethodsGenerator does not check for this so the generated extension methods do not have the ObsoleteAttribute.

This is fixed by Cysharp/csbindgen#79

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.