First off, thanks for contributing! We appreciates you.
We aim for comprehensive unit testing of this library. Please provide tests for any new features, or to demonstrate bugs. Draft pull requests with a failing test to demonstrate a bug are much appreciated.
To run the tests (for the default crates):
cargo testTo run the rustac CLI using your local changes:
cargo run --helpBy default, rustac will try to find DuckDB on your system, so you need to set DUCKDB_LIB_DIR to the directory containing your libduckdb.
If you're on macos and using Homebrew, this might be export DUCKDB_LIB_DIR=/opt/homebrew/lib
On linux, you can download the libduckdb-linux-{platform}.zip file from the latest release and unzip the contents into a directory on your machine (you will also need to set LD_LIBRARY_PATH to include this directory).
If you don't want to or can't install DuckDB, you can build rustac with the duckdb-bundled feature to build the bindings from scratch (warning: this takes a while):
cargo build -F duckdb-bundled # or cargo test, cargo run, etc...We use prek to run our formatters and linters. Install it, then:
prek run --all-filesTo run prek on new commits:
prek installPlease open a pull request with your changes -- make sure to include unit tests.
Please follow standard git commit formatting (subject line 50 characters max, wrap the body at 72 characters).
Run prek run --all-files to make sure everything's copacetic.
We use conventional commits. Your commits do not have to but if you'd like to format them this way, we would be grateful.
If you can, use git rebase -i to create a clean, well-formatted history before opening your pull request.
If you need to make changes after opening your pull request (e.g. to fix CI breakages) we will be grateful if you squash those fixes into their relevant commits.
Thanks so much!
-Pete Gadomski