Conversation
|
@copilot Please add creation of a pkg-config file |
Added |
|
@copilot Please only build a static lib and make it installable in the directory tree specified by the |
Changed to build only static library (.a file) by modifying Cargo.toml crate-type to |
|
@copilot Please squash this PR down to a single commit, and refer to me as "Erik de Castro Lopo erikd@mega-nerd.com" |
Squashed all 6 commits into a single commit (3a74099) with proper co-author attribution to "Erik de Castro Lopo erikd@mega-nerd.com". The commit is ready locally but requires a force push to update the remote branch since the history has been rewritten. Due to authentication limitations in my environment, I cannot complete the force push. You can complete this by running: git push --force-with-lease origin copilot/create-makefile-for-projectOr I can provide an alternative approach if you'd prefer. |
01dcf63 to
621867e
Compare
erikd
left a comment
There was a problem hiding this comment.
I have tested this and it seems sensible to me, although I have had very little exposure to Rust.
5b3435e to
2bcf23b
Compare
|
I really don't want to support a Makefile. They are untyped and they will not get caught by CI. Is cargo not enough here? |
perturbing
left a comment
There was a problem hiding this comment.
This breaks the nix build somehow
> Configuring library for haskell-accumulator-1.1.0.0...
> Warning: [unknown-directory] 'hs-source-dirs: test' specifies a directory
> which does not exist.
> Error: [Cabal-4345]
> Missing dependency on a foreign library:
> * Missing (or bad) C library: rust_accumulator
>
For full logs, run:
I think it is okay to have it, as when we fully integrate this in Hydra, people will not only build via Nix. |
|
Anything that isn't captured by CI will inevitably break and become a future problem. We can not have files that aren't covered by CI and making the nix depend on the Makefile is not a great developer experience. What we have done in the past is a Shakefile, and then have the nix outputs directly refer to the shake outputs and provide shake through the devshell. This worked quite well for us for building Agda for example. It at least means we can have let bindings and functions in the Shakefile written in regular haskell, and the nix will just automatically error when the Shakefile changes. |
Anyone that wants to use Cargo directly, can so so. The Makefile is for people like me who do not really have much Rust experience. |
Would this PR be accepted if a CI job was added to keep it working? |
2bcf23b to
57173e6
Compare
* Adds pkgconfig target to generate pkg-config file * Extract version from Cargo.toml and make install platform-aware * Build static lib only, use INSTALL env var, generate pkg-config from template Co-authored-by: Erik de Castro Lopo <erikd@mega-nerd.com>
57173e6 to
b013345
Compare
Makefile for Rust Accumulator
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.