Rename libtree-sitter.lib target to libtree-sitter.dll.a which is
what MinGW actually uses, move the target after libtree-sitter.dll,
and make sure it is installed to the correct location.
Also avoid invoking `cc -dumpmachine` multiple times.
* Move all rust crates (except lib) into crates dir, w/o nesting
* Remove stale path from .gitattributes
* Rename lib.rs files for easier navigation
* Rename mod.rs file for easier navigation
* Fix emscripten-version path
* Fix fixtures dir paths
* Use the default rustfmt settings
* Don't use nightly on CI
Building tree-sitter on Windows within a Cygwin or MSYS2 environment
for MinGW-w64 targets should work. As there's no configure-like step,
the tools have to be specified with:
make CC=x86_64-w64-mingw32-gcc \
AR=x86_64-w64-mingw32-ar \
STRIP=x86_64-w64-mingw32-strip
Useful reference:
[How to build and use DLLs on Windows](https://nullprogram.com/blog/2021/05/31/)
This commit doesn't tag public functions with dllexport or
dllimport. This results in exporting non-static functions visible
between translation units, and generating slightly less efficient code
for calling exported functions from the DLL.
This commit doesn't include support to build libtree-sitter with MSVC or
clang-cl, but generates a libtree-sitter.lib file for MSVC/clang-cl
consumers.
If you package tree-sitter for a distribution, the distribution is
setting the CFLAGS which should be used for all packages. Allow those
flags to be used.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Quality of life improvements:
- automatically use `gh auth token` when running `make changelog`
- Add full links to related pull requests
- Include non-conventional commits
- Force group order by adding html comments