Possibility to switch from visual studio build tools to CMake #527
-
I would like to compile locally the core in order to experiment a bit with it. Since the repository is quite big, I started doing the newbie thing and checked on google if there's an automation tool to build CMakeLists.txt from existing vcxproj. Turns out, there is. So I ran it on my fork and got an output for almost all vcxproj files, except for
... but since it's labeled as "secret" I guess I shouldn't worry too much. The flags where converted to
Now I want to try and compile at least the demo camera somehow to see if this works. Honestly, the final goal would be to use nanobind and build an experimental binding which would not use swig. Would that be a feasible replacement to the current build toolchain? Should there be something I need to take into consideration? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 13 replies
-
not that this answers the question here, but I was chatting with @jacopoabramo anyway today so briefly talked about this. I told him that @marktsuchida is the build guru and will ultimately have the best advice. Told him about meson and #418, and |
Beta Was this translation helpful? Give feedback.
-
Thanks, @tlambert03. @jacopoabramo For MMCore, you can use the Meson build added in #416. It is not official yet but is maintained (see the GitHub CI), and could probably be a starting point for experimenting with new bindings. See the pymmcore Are you aiming to create bindings for MMCore, or directly the device adapters? One thing I'd point out is that I would not rely on the interface between MMCore and MMDevice (that is, the functions that device adapter DLLs expose for use by MMCore) as a stable API (in contrast to the MMCore API called from pymmcore/MMCoreJ and the MMDevice API against which device adapters are written). We really need this to be the case in order to be able to evolve things given the other legacy constraints we are working under. It might also be useful to know that device adapter binaries built under different compilers and build systems are usually compatible with MMCore as long as the device interface version matches (MMDevice is designed that way). BTW I'm familiar with pybind11 but had not encountered nanobind -- this sounds nice. Curious to hear more about what you are aiming at. |
Beta Was this translation helpful? Give feedback.
-
The main target of my train of thought is what @tlambert03 already suggested. An initial approach in order to not modify the codebase at all would be divided in the following steps:
Point one would allow to have multi-camera support without relying on the MultiCamera device adapter; point 2 is just to make sure that nothing weird happens when for example a new core tries to import an already loaded DLL. Honestly my goal is to get rid of the SWIG interface, since - as already stated by @tlambert03 - I just want the pure python/C++ interface. To be clear, this is not a PR proposal: my fork would be only keeping track of the main fork and synchronize whenever new changes are triggered; it would probably remove the MMCoreJ because of the point I stated before but it will never apply factual changes to the code base. Factually, it's just a way to expand pymmcore (and pymmcore-plus by reflection) to provide more fine-grained control over the existing hardware. |
Beta Was this translation helpful? Give feedback.
-
Could you maybe try to elaborate a bit more on this point? Identifying possible bottlenecks over which I have no prior knowledge is my priority and I might not be considering corner cases like the one you mentioned. Do you mean that some device adapters are independent from each other in some capacity? |
Beta Was this translation helpful? Give feedback.
At any rate I will answer to my own question after the discussion I had with @tlambert03 : SWIG can't be replaced in the main fork since it provides compatibility with MMCoreJ so there's that.