otobrglez / gh-puller

Demonstration of Scala Native with Scala CLI and libcurl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gh-puller

⚠️ This is highly experimental project that demonstrates the usage of Scala Native with Scala CLI

Development

The easies way to get started with this project is to install nix-shell (shell.nix) and then install Scala CLI and other dependencies, such as libcurl with it.

nix-shell --pure ./shell.nix
make clean all

Or with scala-cli:

scala-cli --power package --native . -o gh-puller -f \
  --maintainer "Oto Brglez"

Notes

  • Scala Native compilation can be a bit slow. To speedup the development process I've wrote a curl_requests.c in pair with curl_requests_test.c. Meaning that you can compile and run your C code independently of Scala (Native) build process.
  • The curl_requests.c code is likely "leaky" as it doesen't release memory after the "c strings" are returned from C code to Scala context. Additional work is needed to get that goin'

Resources

About

Demonstration of Scala Native with Scala CLI and libcurl


Languages

Language:Scala 45.4%Language:C 40.7%Language:Makefile 8.9%Language:Nix 5.0%