Update contribution guidelines
This commit is contained in:
1 parent
098c967206
commit
1aa0aa128f
1 file changed
+8
-49
+8
-49
@@ -8,57 +8,16 @@
|
||||
|
||||
## Contributing code
|
||||
|
||||
- Get familiar with the code base before you start. I'll try to add more documentation providing a high-level overview of the architecture in the future. Until then, feel free to reach out through [Discussions](https://github.com/meehl/rusty-path-of-building/discussions) if you have any questions.
|
||||
- If you intend to work on the API functions, also check out the [SimpleGraphic](https://github.com/PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic) code base. A great place to ask questions about it is the PoB dev discord server. [Here](https://github.com/PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic) is more info on how to join.
|
||||
- Get familiar with the code base before you start. Feel free to reach out through [Discussions](https://github.com/meehl/rusty-path-of-building/discussions) if you have any questions.
|
||||
- Make sure the [API](https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api.rs) functions stay compatible with [SimpleGraphic](https://github.com/PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic) (SG). A great place to ask questions about SG is the PoB dev discord server. [Here](https://github.com/PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic) is more info on how to join.
|
||||
- Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
|
||||
|
||||
## macOS Development Setup
|
||||
## Code Ownership and AI-Assisted Contributions
|
||||
|
||||
### 1. Install Lua runtime dependencies
|
||||
Contributors are responsible for every line of code they submit, regardless of how it was written. Make sure to:
|
||||
|
||||
The application requires several Lua C libraries at runtime. Install them using LuaRocks with the LuaJIT backend:
|
||||
- **Understand your code** - You must be able to explain how your contribution works and why it is implemented the way it is.
|
||||
- **Review before submitting** - Carefully review all AI-generated code for correctness, security, maintainability, and consistency with the project's conventions.
|
||||
- **Maintain quality** - AI assistance is not an excuse for untested code, unnecessary complexity, duplicated logic, or careless implementations.
|
||||
|
||||
```bash
|
||||
brew install luajit luarocks
|
||||
|
||||
luarocks --lua-version 5.1 install luasocket
|
||||
luarocks --lua-version 5.1 install luautf8
|
||||
luarocks --lua-version 5.1 install lua-curl
|
||||
```
|
||||
|
||||
Build and install `lzip` from the bundled source (requires zlib, which is pre-installed on macOS):
|
||||
|
||||
```bash
|
||||
cd lua/libs/lzip && make LUA_IMPL=luajit install
|
||||
```
|
||||
|
||||
### 2. Configure LUA_CPATH
|
||||
|
||||
Add the following to your shell profile (`~/.zshrc` or `~/.bash_profile`) so the runtime can locate the installed libraries:
|
||||
|
||||
```bash
|
||||
eval $(luarocks --lua-version 5.1 path)
|
||||
```
|
||||
|
||||
Then reload your shell or run `source ~/.bash_profile`.
|
||||
|
||||
### 3. Startup
|
||||
|
||||
```bash
|
||||
cargo run <poe1|poe2>
|
||||
```
|
||||
|
||||
Path of Building files are automatically downloaded to the following directories on first startup:
|
||||
|
||||
- poe1: `~/Library/Application Support/RustyPathOfBuilding1`
|
||||
- poe2: `~/Library/Application Support/RustyPathOfBuilding2`
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
**Build fails with `library 'luajit-5.1' not found`**
|
||||
|
||||
This usually means the build cache points to an old LuaJIT version after a Homebrew upgrade. Run:
|
||||
|
||||
```bash
|
||||
cargo clean && cargo run <poe1|poe2>
|
||||
```
|
||||
If you cannot confidently explain and verify a piece of code, don't submit it.
|
||||
Reference in new issue
Block a user