Ryujinx
ComLightInterop
Our great sponsors
Ryujinx | ComLightInterop | |
---|---|---|
336 | 8 | |
32,055 | 41 | |
17.3% | - | |
9.7 | 4.2 | |
5 days ago | 6 months ago | |
C# | C# | |
MIT License | MIT License |
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.
Ryujinx
-
Nintendo Switch Emulator: Progress Report December 2023
Their C# JIT [1] generates x86_64 or ARM native code. This is why it's fast.
1: https://github.com/Ryujinx/Ryujinx/tree/master/src/ARMeilleu...
- When Zig Outshines Rust – Memory Efficient Enum Arrays
-
RyujinX – Open Source Nintendo Switch Emulator
This isn't true anymore. It was their first approach, but since then they have switched to their own JIT recompiler. You can read their rationale here: https://github.com/Ryujinx/Ryujinx/pull/693
For the MacOS port, they explain in the blog post you linked that they use an hypervisor, meaning the original game binary runs untranslated. (with the option to use an ARM-to-ARM JIT)
-
[GUIDE] - Build your own nightly Version of Ryujinx
Thanks for the guide. I am new to Ryujinx, but is there a version that runs Monster Hunter Rise: Sunbreak? I searched on reddit and github but I got lost on the part where gdkchan tried to solve the issue here. Maybe it doesn't work on Mac?
- Any way to fix this in totk, it's like this all over the depths making this part basically unplayable (MacBook Air m2, system version 16.0.0 and totk ver. 1.1.1
- Hi everyone, I’m using ryujinx for an 8gb Ram Mac with an intel iris gpu, game runs pretty smooth but this happens with the graphics on Pokémon brilliant diamond, what could be the reason and what settings can I adjust ?
-
Trying to load into a save after TOTK Crashed, how do I fix it? (Im guessing the E stands for Error in the log file)
Same as previous post. Latest version did change things related to hashing https://github.com/Ryujinx/Ryujinx/commit/58907e2c290473326e5ab74bdfe1429b8a518ba4 so probably bug?
-
I need help on getting TOTK stable on Ryujinx (M1 air, 16 gb ram)
Did you try the build in here: https://github.com/Ryujinx/Ryujinx/pull/4899
-
Thinking about choose Steam deck or laptop with ryzen 5 3500u
As it’s emulator, you can’t be sure about games performance as a whole. Some perform better, some - worse, some won’t run at all. You can have a quick look at this video for example https://youtu.be/9XyjErqV3pI Then you should check if the games you’re interested in are considered playable https://github.com/Ryujinx/Ryujinx/wiki/ Actually, there is another one emulator Yuzu and some games may perform better with it. BTW I have a bit better 5500u processor with 16 dual-channel. It performs quite well even with aaa games till 2020. But there are also so many good old games :) Currently I’m playing Warcraft 3 and it still looks and plays very well.
- The following packages have unmet dependencies: mintsources: Depends: mint-common (>= 2) but it is not going to be installed
ComLightInterop
-
Swig – Connect C/C++ programs with high-level programming languages
I have once made something remotely similar, to interop between C++ and C#: https://github.com/Const-me/ComLightInterop
I took different approach. Because I only needed to support these two languages, there’s no separate interface definition language, and no code generator for interfaces. Instead, users are expected to write both language projections manually.
Then there’s a runtime code generator on the .NET side of the interop which builds runtime callable proxy types for interfaces implemented in C++, also virtual tables for C# objects consumed by C++.
-
C# 11 Preview Updates – Raw string literals, UTF-8 and more
It’s pretty fast. Likely reason for that, MS designed both language and runtime this way since version 1.0. They needed that for their Windows Forms which consumes huge chunk of WinAPI.
I benchmarked a while ago when testing this library https://github.com/Const-me/ComLightInterop#performance On the computer I was using at that time (probably Ryzen 5 3600 CPU) the overhead was 15-20 nanoseconds per call.
-
Mach v0.1 – cross-platform Zig graphics in ~60 seconds
That thing is COM, which is a small subset of C++ ABI. Technically it’s about the same as on Windows, i.e. C ABI with extra first argument for this pointer.
Once upon a time I made this library https://github.com/const-me/comlightInterop/ The native side of the interop is idiomatic C++, here’s an example https://github.com/Const-me/ComLightInterop/blob/master/Demo... The C# side of the interop is implemented through the built-in C interop, here’s the relevant part of the library https://github.com/Const-me/ComLightInterop/blob/master/ComL... I’ve tested Linux version of that library on AMD64, ARMv7, and ARM64 CPUs, but only with gcc compiler on the native side.
-
COM+ Revisited
I like many parts of COM, but I believe that example mostly demonstrates bad parts, with IDL, registrations, and over-engineered support libraries.
There's nothing wrong with exporting factory functions from DLLs. Microsoft does it all the time, APIs like Direct3D, DirectDraw and Media Foundation don't come with type libraries are they aren't registered anywhere.
Speaking about support libraries, I once made my own: https://github.com/Const-me/ComLightInterop/tree/master/ComL... Compare examples from that article with this one: https://github.com/Const-me/ComLightInterop/blob/master/Demo... That source file is the complete DLL which implements a minimalistic COM object.
-
The Serde Rust Framework
> Does it feel "brittle" to use
Yes and no.
No because when you try to do unsupported things like calling a method on an object which doesn’t support one, you gonna get an appropriate runtime exception.
Yes because if you fail lower-level things like local parameter allocation, you gonna get an appropriate runtime exception but that one is (1) too late, I’d prefer such things to be detected when you emit the code, not when trying to use the generated code (2) Lacks the context.
Overall, when I can I’m using that higher-level System.Linq.Expressions for runtime codegen. Things are much nicer at that level. I only using the low-level thing when I need to emit new types, like there: https://github.com/Const-me/ComLightInterop/blob/master/ComL...
- Weird
-
Building a shared vision for Async Rust
> Do you have any good resources on writing dlls to consume via .net like you’re talking about?
For C APIs i.e. functions, structures and strings, the good resource is Microsoft documentation, the support is built-in, see “Consuming Unmanaged DLL Functions” section: https://docs.microsoft.com/en-us/dotnet/framework/interop/
For COM APIs i.e. sharing objects around see this library + demos: https://github.com/Const-me/ComLightInterop It’s only really needed on Linux because the desktop version of the framework has COM support already built-in, but it can be used for cross-platform things just fine, I tested that quite well i.e. not just with these simple demos.
> How do you deal with the managed memory when using the gc from .net
Most of the time, automatically.
When you calling C++ from C#, the runtime automatically pins arguments like strings or arrays. Pinning means until the C++ function returns, .NET GC won’t touch these things. This doesn’t normally make any copies: C++ will receive raw pointers/native references to the .NET objects.
Sometimes you do want to retain C# objects from C++ or vice versa i.e. keep them alive after the function/method returns. An idiomatic solution for these use cases is COM interop. IUnknown interface (a base interface for the rest of COM interfaces) allows to retain/release things across languages.
-
Experimental Nintendo Switch Emulator written in C#
C++ interop is not supported in modern .NET out of the box, but wasn't too hard to implement as a library: https://github.com/Const-me/ComLightInterop
What are some alternatives?
yuzu - Nintendo Switch emulator
miniserde - Data structure serialization library with several opposite design goals from Serde
BetterJoy - Allows the Nintendo Switch Pro Controller, Joycons and SNES controller to be used with CEMU, Citra, Dolphin, Yuzu and as generic XInput
mach - zig game engine & graphics toolkit
citra - A Nintendo 3DS Emulator
sapio - A Bitcoin Programming Language
Ryujinx-Games-List - List of games & demos tested on Ryujinx
pfr - std::tuple like methods for user defined types without any macro or boilerplate code
dolphin - Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.
mach-glfw-vulkan-example - mach-glfw Vulkan example
xqemu - Open-source emulator to play original Xbox games on Windows, macOS, and Linux
ioccc-obfuscated-c-contest - IOCCC International Obfuscated C code contest entries