Skip to content

Commit 6cccdfd

Browse files
committed
Update contribution guidelines
- Remove outdated note about CoreFoundation. - Add scope docs. - Document `Cargo.modified.toml`. - Small fixes.
1 parent 8ef2b23 commit 6cccdfd

File tree

3 files changed

+47
-16
lines changed

3 files changed

+47
-16
lines changed

CONTRIBUTING.md

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
# Contributing to `objc2`
22

3-
Thank you for your interest in contributing! There are many ways to contribute and we appreciate all of them.
3+
Thank you for your interest in contributing to `objc2`! The project is
4+
currently run mostly by me, [@madsmtm](https://github.com/madsmtm), but I am
5+
developing this project for the Rust community, and I am very open to
6+
contributions.
47

8+
For small changes, just file a PR. For larger changes, please file an issue
9+
first, such that we can discuss the implementation plan before you potentially
10+
waste a bunch of work.
511

6-
## A note for Windows users
12+
If you prefer to have a more synchronous and less "formal" discussion, we have
13+
[a Matrix workspace](https://matrix.to/#/#objc2:matrix.org), feel free to
14+
discuss implenentation details in the "Developers" room.
15+
16+
17+
## Windows users
718

819
This repository relies heavily on symlinks, so make sure that your system is
920
set up to enable those (see [this StackOverflow answer][so-symlink] for
@@ -14,13 +25,13 @@ details on how to do that).
1425

1526
## Framework crates
1627

17-
`objc2` uses a custom tool called `header-translator` to generate the framework
18-
crates. Head over to [the README](./crates/header-translator/README.md) for
19-
more detailed instructions on how to use this tool, and generate new bindings.
28+
`objc2` uses a custom tool called `header-translator` to generate the crates
29+
in `framework-crates/*`. The plan is to eventually upstream this tooling into
30+
[`bindgen`](https://github.com/rust-lang/rust-bindgen), though doing that will
31+
be a lengthy process.
2032

21-
Note that crates that use `CoreFoundation`-like functionality is likely to not
22-
yet be translatable, see [#556](https://github.com/madsmtm/objc2/issues/556)
23-
for progress on this front.
33+
Head over to [the README](./crates/header-translator/README.md) for more
34+
detailed instructions on how to use this tool and generate new bindings.
2435

2536

2637
### `git` submodules
@@ -55,17 +66,29 @@ manpage for [`git-submodule`] for further details on how submodules work.
5566

5667
### Updating the `git` submodule
5768

58-
When making changes to `header-translator`, you must update the `git`
59-
submodule manually and push your changes to a fork of `objc2-generated` (you
60-
do not need to submit a PR to that repo).
69+
When making changes framework crates, you must update the `git` submodule
70+
manually and push your changes to a fork of `objc2-generated` (you do not need
71+
to submit a PR to that repo).
6172

6273
We try to maintain a linear history in that repo, in a fashion such that every
6374
ref that is ever referenced from the `HEAD` branch in this repository, is
6475
reachable from the `HEAD` branch that repository. This will probably mean
6576
you'll have to rebase more often.
6677

6778
If you're confused about this, don't worry too much about it, if you enable
68-
"Allow edits by maintainers" we can fix it for you.
79+
"Allow edits by maintainers", we can fix it for you.
80+
81+
82+
## Scope
83+
84+
The aim of the project is to map all of Apple's C and Objective-C frameworks,
85+
in [a manner that is as nice to use as possible][nice-to-use].
86+
87+
Access to Swift-only frameworks or functionality is [out of scope][swift-oos]
88+
for the time being.
89+
90+
[nice-to-use]: https://github.com/madsmtm/objc2/issues/429
91+
[swift-oos]: https://github.com/madsmtm/objc2/issues/524
6992

7093

7194
## Licensing

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@
33
[![License](https://badgen.net/badge/license/MIT/blue)](./LICENSE.txt)
44
[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml)
55

6-
**See [`objc2`] for top-level documentation**, including its [documentation on framework crates]. Also check out [`block2`] and [`dispatch2`].
6+
**See [`objc2`] for top-level documentation**, including [the documentation on framework crates].
7+
8+
Also check out [`block2`] and [`dispatch2`].
79

810
[`objc2`]: https://docs.rs/objc2/
9-
[documentation on framework crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html
11+
[the documentation on framework crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html
1012
[`block2`]: https://docs.rs/block2/
1113
[`dispatch2`]: https://docs.rs/dispatch2/
1214

1315

14-
## Contact Us
16+
## Contact
1517

1618
Always feel free to [open an issue on GitHub](https://github.com/madsmtm/objc2/issues/new/choose) if you find a problem or have any questions.
1719

18-
If you prefer to have a more synchronous and less "formal" discussion, we have [a Matrix workspace](https://matrix.to/#/#objc2:matrix.org), feel free to ask any questions in the "Users" room.
20+
If you prefer to have a more synchronous and less "formal" discussion, there is [a Matrix workspace](https://matrix.to/#/#objc2:matrix.org), feel free to ask any questions in the "Users" room.
1921

2022

2123
## License

crates/header-translator/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ The `translation-config.toml` file describes various tweaks that we need to do b
7272

7373
However, even if our header translation was perfect, we still need a way to enrich the generated data, since C headers have no way to describe which methods are safe and which are not!
7474

75+
Manual modifications to `Cargo.toml` can be done by adding a
76+
`Cargo.modified.toml` file, and including the keys that you want modified.
77+
78+
See [objc2-foundation](../../framework-crates/objc2-foundation) for a good
79+
example of these files at work.
80+
7581

7682
### What is required for a method to be safe?
7783

0 commit comments

Comments
 (0)