This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-20
Channels
- # announcements (10)
- # architecture (7)
- # babashka (49)
- # beginners (125)
- # calva (2)
- # chlorine-clover (33)
- # clj-kondo (15)
- # cljs-dev (18)
- # cljsrn (28)
- # clojure (91)
- # clojure-argentina (37)
- # clojure-austin (4)
- # clojure-dusseldorf (1)
- # clojure-europe (3)
- # clojure-france (2)
- # clojure-germany (2)
- # clojure-nl (4)
- # clojure-portugal (4)
- # clojure-spec (26)
- # clojure-uk (19)
- # clojuredesign-podcast (5)
- # clojurescript (19)
- # conjure (20)
- # core-async (4)
- # cursive (60)
- # data-science (4)
- # datomic (1)
- # duct (9)
- # emacs (11)
- # events (1)
- # fulcro (9)
- # graalvm (17)
- # jobs-discuss (7)
- # luminus (19)
- # malli (36)
- # meander (2)
- # off-topic (23)
- # pathom (2)
- # quil (1)
- # rdf (4)
- # re-frame (16)
- # reitit (10)
- # ring (21)
- # ring-swagger (1)
- # shadow-cljs (137)
- # spacemacs (10)
- # sql (27)
@borkdude - question re: the rust-clojure interop repo you built — I used it as a basis to compile a tool I'm building. It works on the machine I compile with, but when I move the binary to another computer it fails with a java.lang.UnsatisfiedLinkError — did you ever run into this?
So the resulting binary assumes some libraries must exist on the machine for it to dynamically link against it
Ah, that might be it. Thanks @didibus . Looks like you can't compile static on mac? Guess I'll have to set it up on my linux box.
@tees The idea is to copy the dynamic library from the resources to the filesystem and load it from there at startup: https://github.com/borkdude/clojure-rust-graalvm/blob/044ef3c921e7b2c9058e431a62574d85b1079011/clojure/src/clj_rust/core.clj#L10
Ah. Sounds like perhaps it is not entirely possible to have a totally self contained binary with two languages.
@tees The problem is that you cannot load native libraries from within your bundled resources. That's why you have to spit it out first. But this doesn't have to be visible to the end user
Ah, so it seems like the linked function you posted above happens at compile time? And I would just switch that to happen at runtime?
err, I see that it's transferring it from the resources to the home directory - so I guess the binary packages the lib, and then on runtime it should be copying it to my home dir.
yes, at runtime there is a check to see if the lib is there, and if it isn't, it's copied