Hello, I am new to Clojure, having picked it for native development. I am exploring all the current offerings. I am working with Krell right now, and I get the following non-fatal error when starting on iOS: Any idea what it is?
You can also disable Hermes in your react-native project: https://github.com/vouch-opensource/krell/issues/153
But :langauge-out :es5 in build.edn seems to be the better option 👍
@nnnsadeh You can also just disable Hermes, see e.g. here: https://github.com/joshuamiller/react-native-template-cljs-krell-storybook/commit/6b13ae61a511d7079746bc3f63430fcba52f70a0
@thheller I don't see any such option in krell unfortunately @joshmiller it appears Hermes has a bunch of advantages I don't want to give up on
Actually I misunderstood - it's a cljs setting, not a krell setting. I added :langauge-out :es5 to build.edn and that got rid of the issues.
react-native somewhat recently switched to use the Hermes JS engine as the default. That engine does not support the use of const which the namespace you highlighted likely wants to use. I don't know how you tell krell to output es5 code by default, but look for that.
something like :language-out should be documented
Also beware the Hermes engine lack of full WebAssembly support. If you use any Rust cryptography libraries you won’t be able to use React Native. That’s okay because you can always switch to using Ionic and Capacitor, which is better than Expo Go if you end up needing to write custom plugins: https://marko.euptera.com/posts/ionic-clojure.html https://github.com/markokocic/ionic-clojurescript-todo
If base React Native works for you then knock yourself out with @pez’s great template: https://github.com/PEZ/rn-rf-shadow
That worked great for me. By no fault of his own I had to discard my work using that Repo since React Native’s Hermes engine doesn’t support the WebAssembly I am required to use.
There’s the https://github.com/cawfree/react-native-webassembly library though that didn’t solve my issue, likely because the cryptography libraries I was trying to use need more than one memory region and this library only supports a single memory region:
> Currently, wasm3 https://github.com/wasm3/wasm3/blob/772f8f4648fcba75f77f894a6050db121e7651a2/source/wasm3.h#L214. This means that WebAssembly files which contain multiple memory allocations are not currently supported.