windy
windy | objc-ast-experiments | |
---|---|---|
5 | 2 | |
110 | 7 | |
- | - | |
4.7 | 10.0 | |
6 months ago | over 2 years ago | |
Nim | C | |
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.
windy
-
Show HN: C-ocoa, Write iOS/macOS apps in any language, with a generated C API
Interesting project, though I'd rather just use Obj-C. I guess if you wanna use it in something like JavaScript or Lua it'd make sense to have C as a bindi g layer.
> https://gamepipeline.org/betray.html
Interesting, I've been using a similar project for Nim lately: https://github.com/treeform/windy
It's surprising how simple Obj-C interaction is compared to Java JNI or something. Here's the Obj-C interop for Windy:
- macdefs: https://github.com/treeform/windy/blob/master/src/windy/plat...
- How can I add graphics to my nim program?
-
How to detect and even save key presses
I used https://github.com/treeform/windy in my text editor. It's a pure Nim library like SDL. For separate keypresses I used a state machine where every keypress advances the state and when it reaches an end state the action performed. Works pretty well ^
-
Simple Gamepad Support
I made it because I really like pixie/boxy/windy combo, but there is no gamepad support built-in.
-
Is Fidget usable for implementation of 3D rendering?
The author Fidget actually has a number of other great libraries that are part of the rendering stack. Notably, Pixie for text and shape rendering in 2D, Boxy for rendering textures to the GPU via opengl, and then Windy for an OS window context and user events, and a number of other libraries related to 3D rendering.
objc-ast-experiments
-
C-Macs – a pure C macOS application
Here's something similar by Garret Bass:
https://github.com/garettbass/oc
...I also experimented a bit with parsing macOS system headers via clang-ast-dump and then code-generating C and Zig APIs but that didn't get far:
https://github.com/floooh/objc-ast-experiments
...with a bit of effort and maybe using libclang instead of clang-ast-dump that's definitely feasible though.
I guess a similar approach is used by the official C++ bindings for Metal:
https://developer.apple.com/metal/cpp/
-
Show HN: C-ocoa, Write iOS/macOS apps in any language, with a generated C API
This is basically also what the "official" C++ API for Metal does (https://developer.apple.com/metal/cpp/), it's an automatically generated bindings wrapper which calls into ObjC runtime functions.
I also dabbled a bit with this idea by parsing clang AST-dumps of macOS system headers:
https://github.com/floooh/objc-ast-experiments
Unfortunately this is very brittle, and also broke on ARM CPUs, I guess the shim code needs some ABI adjustments (famously, objc_msgSend has multiple "ABI shapes": https://www.mikeash.com/pyblog/objc_msgsends-new-prototype.h...).
What are some alternatives?
FreeCAD - This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler. Issues are managed on our own bug tracker at https://www.freecadweb.org/tracker
metal-cpp - Metal-cpp is a low-overhead C++ interface for Metal that helps developers add Metal functionality to graphics apps, games, and game engines that are written in C++.
imgui - ImGui bindings for Nim via cimgui
cpython - Alternative StdLib for Nim for Python targets, hijacks Python StdLib for Nim
NimForUE - Nim plugin for UE5 with native performance, hot reloading and full interop that sits between C++ and Blueprints. This allows you to do common UE workflows like for example to extend any UE class in Nim and extending it again in Blueprint if you wish so without restarting the editor. The final aim is to be able to do in Nim what you can do in C++
pixels - Toy support library for primitive graphics programming.
pixie - Full-featured 2d graphics library for Nim.
vulkan - Vulkan C bindings for Nim
boxy - 2D GPU rendering with a tiling atlas.
nimgl - NimGL is a Nim library that offers bindings for popular libraries used in computer graphics
nico - a Game Framework in Nim inspired by Pico-8.
nimraylib_now - The Ultimate Raylib gaming library wrapper for Nim