Skip to content

Add a compatibility Makefile stub#531

Merged
cpu merged 2 commits intorustls:mainfrom
cpu:cpu-makefile
Jan 22, 2025
Merged

Add a compatibility Makefile stub#531
cpu merged 2 commits intorustls:mainfrom
cpu:cpu-makefile

Conversation

@cpu
Copy link
Member

@cpu cpu commented Jan 20, 2025

Adds a tiny Makefile that defers to cargo capi install.

Previously rustls-ffi offered a GNU Makefile for building the library on Linux/MacOS. Because of the inherent limitations of this build system and a desire to have uniformity across all supported operating systems we've replaced this with usage of cargo-c.

While the README documents the finer details of using cargo-c it's likely some users just want to keep doing what they were doing before: running make install with a custom DESTDIR.

This commit provides a shortcut to do just that, backed by cargo-c. I have explicitly not restored the ability to:

  • build/run the client/server tests: this is handled by cmake now.
  • handle developer tasks like formatting/linting. Also handled by cmake now.
  • customize the build (e.g. debug build, alt crypto providers, fips mode, etc). Use cargo-c directly for this per the README instructions.

Resolves #525

I went to do this work and then realized we need unreleased support for
tree-sitter 0.24 in tree-sitter-md before we can start on this. Add
a note for clarity.
@cpu cpu self-assigned this Jan 20, 2025
@cpu
Copy link
Member Author

cpu commented Jan 22, 2025

@ctz Do you have time to give this a +1? Also open to feedback that it's not worth the trouble.

Adds a tiny Makefile that defers to `cargo capi install`.

Previously rustls-ffi offered a GNU `Makefile` for building the library
on Linux/MacOS. Because of the inherent limitations of this build system
and a desire to have uniformity across all supported operating systems
we've replaced this with usage of `cargo-c`.

While the README documents the finer details of using `cargo-c` it's
likely some users just want to keep doing what they were doing before:
running `make install` with a custom `DESTDIR`.

This commit provides a shortcut to do just that, backed by `cargo-c`.
I have explicitly not restored the ability to:

* build/run the client/server tests: this is handled by `cmake` now.
* handle developer tasks like formatting/linting. Also handled by
  `cmake` now.
* customize the build (e.g. debug build, alt crypto providers, fips
  mode, etc). use cargo-c directly for this per the README instructions.
@cpu cpu merged commit 596a645 into rustls:main Jan 22, 2025
45 checks passed
@cpu cpu deleted the cpu-makefile branch January 22, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Makefile that invokes cargo-c

2 participants