You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**refactor** - code change that neither fixes a bug nor adds a feature
29
+
30
+
**All PRs must include a commit message with the changes description!**
31
+
32
+
For the initial start, fork the project and use git clone command to download the repository to your computer. A standard procedure for working on an issue would be to:
33
+
34
+
1.`git pull`, before creating a new branch, pull the changes from upstream. Your master needs to be up to date.
35
+
36
+
```
37
+
$ git pull
38
+
```
39
+
40
+
2. Create new branch from `master` like: `doc-548-submit-a-pull-request-section-to-contribution-guide`<br/>
41
+
42
+
```
43
+
$ git checkout -b [name_of_your_new_branch]
44
+
```
45
+
46
+
3. Work - commit - repeat ( be sure to be in your branch )
47
+
48
+
4. Before you push your changes, make sure your code follows the `Rustfmt` coding standards , which is the standard Appwrite follows currently. You can easily do this by running the formatter.
49
+
50
+
```bash
51
+
cargo fmt
52
+
```
53
+
54
+
If the `cargo fmt` command does not work then run the following to install rustfmt:
55
+
56
+
```bash
57
+
rustup component add rustfmt
58
+
```
59
+
60
+
This will give you a list of errors for you to rectify
61
+
62
+
1. Push changes to GitHub
63
+
64
+
```
65
+
$ git push origin [name_of_your_new_branch]
66
+
```
67
+
68
+
6. Submit your changes for review
69
+
If you go to your repository on GitHub, you'll see a `Compare & pull request` button. Click on that button.
70
+
7. Start a Pull Request
71
+
Now submit the pull request and click on `Create pull request`.
72
+
8. Get a code review approval/reject
73
+
9. After approval, merge your PR
74
+
10. GitHub will automatically delete the branch after the merge is done. (they can still be restored).
75
+
76
+
77
+
## Running Tests
78
+
Tests are run with Docker in order to test both alpine builds and GNU linux builds, Docker Compose is also required.
A simple PHP Extension written in Rust to create scrypt password hashes. Supports building on X86-64 and ARM platforms.
4
9
5
10
## Installation
6
-
Once you have a compiled version, either through a release or building it yourself, you can install the extension by moving it to your PHP extension directory which is usually `/usr/local/lib/php/extensions/`. on Linux and `C:\php\extensions` on Windows.
7
11
8
-
Next you need to add the extension to your php.ini file.
12
+
### Compiling Requirements
13
+
- Linux, MacOS or Windows-based operating system
14
+
- Latest Version of Rust Stable
15
+
- PHP 8.0 or newer
16
+
- Clang 5.0 or Later
17
+
18
+
### Notes for Windows compilation
19
+
- This extension can only be compiled for PHP installations sourced from https://windows.php.net.
20
+
- Rust Nightly is required for Windows compilation.
21
+
- This extension requires the `cl.exe` compiler. This is usually bundled with Visual Studio.
While writing this extension we found out that [Rust in general](https://github.com/rust-lang/rust/issues/59302) still has a few issues with [musl libc](https://musl.libc.org/) found in Alpine. It is possible to build this project successfully by using an alternative linker and building on a gnu-based system targetting `linux-unknown-musl`.
42
+
43
+
We strongly recommend using [zigbuild](https://github.com/messense/cargo-zigbuild) as the linker for this project as we found it's the most stable and easy to install alternate linker. we also use the "-C target-feature=crt-static" compiler flags to aid with building on musl as stated [here](https://github.com/rust-lang/rust/issues/59302).
44
+
45
+
The build command for these platforms will look like so:
Building this extension requires that you have a version of PHP installed that has the `php-config` command.
46
-
47
-
After all the prequisites are met simply run the following command to build a release version of the extension:
48
-
```sh
49
-
cargo build --release
50
-
```
51
-
52
-
### Building for Alpine
53
-
While writing this extension we found out that [Rust in general](https://github.com/rust-lang/rust/issues/59302) still has a few issues with [musl libc](https://musl.libc.org/) found in Alpine. It is possible to build this project successfully by using an alternative linker and building on a gnu-based system targetting linux-unknown-musl.
54
-
55
-
We strongly recommend using [zigbuild](https://github.com/messense/cargo-zigbuild) as the linker for this project as we found it's the most stable and easy to install alternate linker. we also use the "-C target-feature=crt-static" compiler flags to aid with building on musl as stated [here](https://github.com/rust-lang/rust/issues/59302).
56
-
57
-
The build command for these platforms will look like so:
-[davidcole1340](https://github.com/davidcole1340) - For developing the [ext-php-rs](https://github.com/davidcole1340/ext-php-rs) bindings used for this project.
77
108
78
-
The MIT License (MIT) [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)
109
+
## Contributing
79
110
111
+
All code contributions - including those of people having commit access - must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.
80
112
113
+
We truly ❤️ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the [contribution guide](CONTRIBUTING.md).
114
+
115
+
## Copyright and license
81
116
117
+
The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php
0 commit comments