jextract VS Silk.NET

Compare jextract vs Silk.NET and see what are their differences.

jextract

https://openjdk.org/projects/code-tools (by openjdk)

Silk.NET

The high-speed OpenGL, OpenCL, OpenAL, OpenXR, GLFW, SDL, Vulkan, Assimp, WebGPU, and DirectX bindings library your mother warned you about. (by Ultz)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
jextract Silk.NET
10 36
325 3,794
8.6% 2.8%
8.9 5.2
4 days ago 6 days ago
Java C#
GNU General Public License v3.0 only MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

jextract

Posts with mentions or reviews of jextract. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-05-08.
  • How to Use the Foreign Function API in Java 22 to Call C Libraries
    11 projects | news.ycombinator.com | 8 May 2024
    I don't think so, given that there are more popular Java libraries than popular libraries with a C ABI. There is a small number of very popular C libraries that result in the majority of native call uses. But in any event, calling native libraries in Java is now no longer a pain thanks to FFM (and jextract [1]) so we'll see.

    Note that interaction with native libraries often requires more careful management of native memory that -- even though it's much easier now with FFM -- is still significantly trickier (and more dangerous in terms of introducing undefined behaviour) than interacting with Java code regardless of how that interaction is declared. In Java, as in Python, interaction with native code -- in the vast majority of cases -- is best encapsulated inside a Java library and not often directly exposed to application programmers.

    [1]: https://github.com/openjdk/jextract

  • Jextract Guide
    1 project | news.ycombinator.com | 20 Apr 2024
  • JExtract Guide (to generate Code to access the native library in Java)
    1 project | news.ycombinator.com | 17 Apr 2024
  • JEP draft: Integrity and Strong Encapsulation
    3 projects | /r/java | 18 Apr 2023
  • JEP 442: Foreign Function & Memory API (Third Preview)
    1 project | /r/java | 18 Mar 2023
    ok, maybe I mixed it up with jextract https://github.com/openjdk/jextract
  • Java 20: A Sneak Peek on the Panama FFM API
    3 projects | news.ycombinator.com | 7 Dec 2022
    This is one level below P/Invoke. It just offers a linking runtime API.

    There's also has a tool that can generate all the bindings from a C header file automatically: https://github.com/openjdk/jextract

    Then it doesn't really matter whether annotations are used or not, or some more low-level linker API (like FFM went with). As a user you just call into the generated bindings.

    That's the philosophy: the JDK provides the low-level capabilities, and jextract provides the 'civilization', i.e. a usability focused layer on top. One of the advantages is that the JDK doesn't compete with other existing solutions, and those existing solution can benefit from the new linking runtime APIs as well.

  • Why Kotlin/Native C Interop not supporting C Preprocessors such as Macros ?
    1 project | /r/Kotlin | 14 Nov 2022
    Depending on how work-aroundy you're feeling, using Kotlin/JVM with Panama and jextract might be the way to go. The generated bindings are a bit ugly, you'd need to use the very latest JVM and enable the preview features, and it won't help if you need to target iOS. But the jextract tool can fully understand C headers including macros because it's using the LLVM clang API to do so.
  • JNA vs JNI Performance Question
    1 project | /r/java | 18 Sep 2022
    You can use jextract and a JDK 19 pre-release build to generate bindings and then do a JMH benchmark.
  • Using Linux's memfd_secret syscall from the JVM with JEP-419 - Panama
    1 project | /r/java | 17 May 2022
    None of that needs to be done in the JDK, though, and the "big" project that can make a big difference here is jextract. The rest can easily be done by libraries.
  • Possible to use Kotlin/Native to call Win API from Kotlin/JVM?
    2 projects | /r/Kotlin | 2 May 2022
    Panama incubator module is available on jdk 17 and you can also use jextract (https://github.com/openjdk/jextract) to generate all java code without writing any JNI glue code.

Silk.NET

Posts with mentions or reviews of Silk.NET. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-05-08.
  • How to Use the Foreign Function API in Java 22 to Call C Libraries
    11 projects | news.ycombinator.com | 8 May 2024
    Genuine curiosity - what would be your motivation to use Java over C# here aside from familiarity (which is perfectly understandable)? The latter takes heavy focus on making sure to provide features like structs and pointers with little to no friction, you can even AOT compile it and statically link SDL2 into a single executable.

    But either way, if you want to try it out, then all it needs is

    - SDK from https://dot.net/download (or package manager of your choice if you are on Linux e.g. `sudo apt-get install dotnet-sdk-8.0`, !do not! use Homebrew if you are on macOS however, use .pkg installer)

    - C# extension for VS Code (DevKit is not needed)

    - SDL2 bindings: https://github.com/dotnet/Silk.NET

  • Is there a real time graphics llibrary in c#
    4 projects | /r/csharp | 17 May 2023
    A couple other options than what has been suggested so far: - TerraFX.Interop.Windows. Raw, blittable, 1:1 bindings for all Win32, D2D/D3D11/D3D12 APIs (there's also a version with Vulkan bindings). As close to doing #include as you can get in C#. This is my personal favorite, I use it in my own ComputeSharp library, and transitively we use it in the Microsoft Store too 🙂 - Silk.NET another version of high-performance bindings, more opinionated than TerraFX and with some additional helpers to make it a bit easier to use.
  • Math Game Project
    3 projects | /r/csharp | 14 May 2023
    Here is an example of using "releases" in GitHub: https://github.com/dotnet/Silk.NET/releases. Most repositories use releases and releases seem like they wpuld be appropriate for your repository too.
  • Is there a way to display 3D models on a page?
    2 projects | /r/dotnetMAUI | 4 May 2023
    I've been looking at this. Is this similar to the UrhoSharp project you talk about? https://github.com/dotnet/Silk.NET
  • [WinUI] High level 2D rendering library
    4 projects | /r/csharp | 27 Mar 2023
  • SDL2 + OpenGL in C#?
    3 projects | /r/gamedev | 17 Mar 2023
    Have you looked at Silk.NET before?
  • Using .NET with low level rendering code?
    1 project | /r/dotnet | 14 Feb 2023
    Take a look at https://github.com/dotnet/Silk.NET . You should be able to use your existing rendering context with it. So you could use something like imgui (They have bindings for that) to render your UI. Or if you just start writing your rendering code, you could consider writing the whole rendering engine with it. I used it in the past for a game engine and performance is no problem for most of the usecases.
  • Anybody using System.Numerics for 3D graphic applications?
    1 project | /r/dotnet | 29 Jan 2023
  • Cross-platform audio playback
    4 projects | /r/AvaloniaUI | 15 Jan 2023
  • C# Game engine - suggestions
    4 projects | /r/gameenginedevs | 29 Dec 2022

What are some alternatives?

When comparing jextract and Silk.NET you can also consider the following projects:

panama-foreign - https://openjdk.org/projects/panama

OpenTK - The Open Toolkit library is a fast, low-level C# wrapper for OpenGL, OpenAL & OpenCL. It also includes windowing, mouse, keyboard and joystick input and a robust and fast math library, giving you everything you need to write your own renderer or game engine. OpenTK can be used standalone or inside a GUI on Windows, Linux, Mac.

panama-liburing

Veldrid - A low-level, portable graphics library for .NET.

Vortice.Windows - .NET bindings for Direct3D12, Direct3D11, WIC, Direct2D1, XInput, XAudio, X3DAudio, DXC, Direct3D9 and DirectInput.

SharpDX

Interactive Data Display for WPF - Interactive Data Display for WPF is a set of controls for adding interactive visualization of dynamic data to your application. It allows to create line graphs, bubble charts, heat maps and other complex 2D plots which are very common in scientific software. Interactive Data Display for WPF integrates well with Bing Maps control to show data on a geographic map in latitude/longitude coordinates. The controls can also be operated programmatically.

Win2D - Win2D is an easy-to-use Windows Runtime API for immediate mode 2D graphics rendering with GPU acceleration. It is available to C#, C++ and VB developers writing apps for the Windows Universal Platform (UWP). It utilizes the power of Direct2D, and integrates seamlessly with XAML and CoreWindow.

Helix Toolkit - Helix Toolkit is a collection of 3D components for .NET.

wgpu - A cross-platform, safe, pure-Rust graphics API.

Avalonia - Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology

LibVLCSharp - Cross-platform .NET/Mono bindings for LibVLC