-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making native builds bulletproof #152
Comments
What it does is that it loads (using I think the problem is finding glfw, I don't know how exactly it works in your distro, so maybe just try to hard-code the path here: graffiti/libgraffiti/src/platform/glfw.rs Line 11 in 46f35fd
And you can also Debugging js part is simple - just run node with BTW: Don't get too much attached to the rust code, I'd like to do few design changes soon (and there are some changes already in the BTW2: If you know how to fix |
Bingo. That was what I was missing. Now I can try to figure out how it fits together.
I just added an option to specify the location via env var. I'm not happy with my solution since it expects th var to be present at both install time and run time - but it's something. I'll put in the PR soon - maybe ponder it some more first |
I don't know about any good solution but it's probably the best to just log big bold warning and not fail the whole install. The idea was that graffiti depends on The fail is here, feel free to fix it if you want. In the future, I'd like to avoid |
Oops, didn't mean to close this 😅 But it's running, and it's awesome! I think there were two separate issues at play here, both stemming from my ignorance of how
As an aside, this is one benefit I get from running a wacky distro: after catching the low-level issues like this - which may seem arcane but are usually based on a simple conceptual model and a simple implementation, and hence, fast and actually engaging to work on (imagine if I had to rebuild a JAR or some shit to see if it worked! I'd just give up) - it's usually smooth sailing. (Of course, the drawback from running a wacky distro is that I have to compose sentences like the above with multiple levels of nested clauses if I want to explain myself, which is very un-rapperlike.)
I think it's not such a bad idea to delegate to a tried-and-true library like glfw. I wonder whether static linking could be beneficial here though. A single statically linked OTOH bypassing |
Yeah, sorry for that. I will eventually hide nodejs interop behind feature flag and it will fix
At least on my machines (mac, raspbian, ubuntu, win vm), libs are searched in cwd first. I'm not that experienced in linux development but I think it'd rather be better if
It was already statically linked before - I was just not happy with that - it took longer to compile, I might need to recompile (and push prebuilt binaries) for supporting new osx versions (or security fixes) and I think it's just better to use system-provided (and patched) version if possible. TBH I like
I think you can do this with nexe - maybe first precompile with ncc. Or if you don't want to bundle npm, it should be as simple as |
small update here :)
|
Yep got kicked from Discord because I'm on a VPN. Figures. Hope you at least received my first message. Anyway, I wanted to ask about how this line is supposed to work:
graffiti/libgraffiti/src/interop/nodejs.rs
Line 101 in 46f35fd
cargo test
segfaults on it andnpm run example
panics withpanicked at 'load lib "libglfw.so.3"'
even though I patchednode-glfw-dylib
to provide it with the path to libglfw.so.3 on my system (which is admittedly a little unorthodox, e.g. my distro works without a ldconfig cache)I haven't done any macros or interop in Rust yet so I don't really know how to start debugging this but it does seem like a fun challenge. Could you give me a quick rundown, or better yet point me to some documentation on how this part is supposed to work - and maybe I can help make it more portable?
The text was updated successfully, but these errors were encountered: