You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think @twuky and I talked about this before, but I think the DRM-stuff needs a little work. A possible solution, in my mind, is to just make a totally seperate npm lib that is only for drm. Essentially, a pi, for example, can run the regular .node file fine, with X, like any other linux, but gets more performance (and works without X) with the DRM-version, so if they were separate npm packages, the user could choose to specifically require that, if they want to. I think we could build/publish both npm packages in CI, so it's not really much of a code-change, other than our build-scripts.
Another option might be an env-var that chooses which native lib to load, but I feel like that could get a bit flakey (it would need to be set at all the different stages, like setup/download/build/runtime.)
An aspect of this issue, also, is that DRM-build is useful, even to non-arm64 (x86_64 can use it too) so targeting only arm64 is maybe not enough, anyway. Originally, we did this because it makes a huge difference on pi0-2 and other low-end ARM64 devices (like Anbernic handhelds) but I think giving everyone the option of DRM or X would be better.
I think this is all related to an overhaul of our build/download steps. It could definitely be simplified and improved.
I'd like to see this, as a total solution, and if it seems ok, I will work on it:
make a new package (maybe raylib-drm?) for DRM-only
build prebuilt drm & regular node packages, for arm64 & x86_64 in CI, for every tag (releases, but also testing tags, etc)
publish both to npm, as separate packages
make the download/build step smarter for end-users for both
test both versions on supported platforms: mac m1/x86_64, windows x86_64 (all 3 use "regular" build) and linux arm64/x86_64 (both drm and regular)
I figured out some CI tricks for doing better matrix-builds and copying assets into releases and stuff (see #182) so I think I can improve the whole setup.
The text was updated successfully, but these errors were encountered:
i remember another solution being that ARM platforms would download both, and then its up to the user to require raylib or raylib/drm. would something like that help here?
I really like that, as a solution. essentially leave it up to the user, so they can include either one, since the default import will work fine (in X.)
I am on Mac M1, in docker (just doing some build-testing) so it's technically ARM64 linux.
If I run a project that uses node-raylib, it seems to be trying to load the plain .node file, but it downloaded the drm file:
On an ARM64 host, this will repro:
This is shape of node_modules:
I think @twuky and I talked about this before, but I think the DRM-stuff needs a little work. A possible solution, in my mind, is to just make a totally seperate npm lib that is only for drm. Essentially, a pi, for example, can run the regular .node file fine, with X, like any other linux, but gets more performance (and works without X) with the DRM-version, so if they were separate npm packages, the user could choose to specifically require that, if they want to. I think we could build/publish both npm packages in CI, so it's not really much of a code-change, other than our build-scripts.
Another option might be an env-var that chooses which native lib to load, but I feel like that could get a bit flakey (it would need to be set at all the different stages, like setup/download/build/runtime.)
An aspect of this issue, also, is that DRM-build is useful, even to non-arm64 (x86_64 can use it too) so targeting only arm64 is maybe not enough, anyway. Originally, we did this because it makes a huge difference on pi0-2 and other low-end ARM64 devices (like Anbernic handhelds) but I think giving everyone the option of DRM or X would be better.
I think this is all related to an overhaul of our build/download steps. It could definitely be simplified and improved.
I'd like to see this, as a total solution, and if it seems ok, I will work on it:
raylib-drm
?) for DRM-onlyI figured out some CI tricks for doing better matrix-builds and copying assets into releases and stuff (see #182) so I think I can improve the whole setup.
The text was updated successfully, but these errors were encountered: