babashka / sci

Configurable Clojure/Script interpreter suitable for scripting and Clojure DSLs
Eclipse Public License 1.0
1.21k stars 85 forks source link

Updates to the libsci instructions documentation #908

Closed udeshx closed 11 months ago

udeshx commented 11 months ago

Hi,

Following up on our Slack discussion yesterday. https://app.slack.com/client/T03RZGPFR/CAJN79WNT/thread/CAJN79WNT-1696657493.369429

A bb script has been added and how to use it have been described in the libsci docs

When following the instructions in the libsci.md documentation I couldn't understand what to do next as the parameters for calling GRAALVM_HOME/bin/native-image were unclear to me.

An existing bb script libsci_tasks.clj in libsci/bb contains a function that ran the GRAALVM_HOME/bin/native-image step of the instructions passing the correct parameters and moved the files generated to the correct folder.

I used that function in a bb script by itself and ran the script to move onto the next steps in the instructions. This PR contains the new bb script containing only that one function (compile-native) and the changes to the libsci.md instructions that explain how to use the script.

borkdude commented 11 months ago

@udeshx This code is already available via babashka tasks, see bb.edn. You can compile the native binary using:

bb libsci:compile
borkdude commented 11 months ago

Run bb tasks to see all available tasks. See here how babashka tasks works: https://book.babashka.org/#tasks