Logo
Explore Help
Register Sign In
georgefst/garnet
1
0
Fork 0
You've already forked garnet
Code Issues Pull Requests 2 Actions Packages Projects Releases Wiki Activity
garnet/generate-bindings

6 lines
209 B
Plaintext
Raw Normal View History

Expose explicit C interface We drop the tools specifically designed for Haskell and Rust together, in favour of general tools for using each with C. Namely, we use Mozilla's `cbindgen` for generating header files from the Rust source, and Well-Typed's new `hs-bindgen` tool for generating Haskell from those header files. The Rust code here is essentially the result of expanding the old macro, then inlining and renaming internals. The most important thing here is that we're now relying solely on robust well-maintained tools.
2026-02-19 11:08:20 +00:00
#!/usr/bin/env bash
set -euo pipefail
Drop build hooks in favour of just using bundled libraries properly The script addition is a bit hacky, but there's no obvious straightforward arch/version-independent way to get most of the build path. And eventually, once issues with HLS etc. are sorted out we will revert to using Cabal hooks anyway.
2026-03-03 20:58:41 +00:00
# Place library in the location from which Cabal can bundle it.
cp rust/target/debug/libgarnet_rs.a $(cabal list-bin . | sed -e 's=x/garnet/build/garnet/garnet=build=g')
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 52ms Template: 7ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API