PRQL

    We are in the early stages of developing Elixir bindings.

    We’re using to provide Rust bindings for prql-compiler.

    • Install dependencies with mix deps.get
    • Compile project mix compile
    • Run tests mix test

    Future work includes publishing pre-compiled artifacts, so Elixir projects can run PRQL without needing a Rust toolchain.

    We currently don’t enable compilation for Mac. This is possible to enable, but causes some issues with cargo’s compilation cache. Briefly: it requires RUST_FLAGS to be set, and because of & https://github.com/rust-lang/cargo/issues/8899, any compilation of a different target will bust the cache.

    • Directing other cargo calls to different paths, such as /target-ra for Rust Analyzer and /target-book for the book building. But one cargo build from the terminal without either the target or target_dir specified will bust the cache!
    • Never compiling for other targets. But our standard tests run for , so this requires refraining from using them.
    • Removing prql-elixir from our workspace, so that cargo commands in the PRQL workspace don’t require rust flags. This would work well, but means we need separate test coverage for this crate, which adds some weight to the tests.

    If prql-elixir becomes more used (for example, we start publishing to Hex, or Mac developers want to work on it), then we can re-enable and deal with the caching issues. We can also re-enable them if the cargo issue is resolved.

    To test on Mac temporarily — for example if there’s an error in GHA and we’re on a Mac locally — apply a diff like this, and then run cargo build from the prql-elixir path, which will enable the local ). (We could also make a feature like which enabled building on Mac).