Skip to content

Commit fbb9e63

Browse files
fahdfadyhulxv
andauthored
docs: edit README.md & CONTRIBUTING.md with setup instructions (#51)
* Enhance CONTRIBUTING.md with setup instructions Added detailed development setup instructions and a table of contents to the CONTRIBUTING.md file. * anchor follow headings * docs: improving contributing.md * fix(build): error[E0618]: expected function, found `metacall::init::MetaCallDestroy` (Fixes #52) * fix: formatting * edit README --------- Co-authored-by: hulxv <hulxxv@gmail.com>
1 parent 28e8870 commit fbb9e63

File tree

2 files changed

+88
-7
lines changed

2 files changed

+88
-7
lines changed

CONTRIBUTING.md

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,74 @@
22

33
Thank you for your interest in contributing to MetaSSR! We welcome contributions from the community to help improve and expand the framework. Please follow the guidelines below to ensure your contributions are effective and align with the project's goals.
44

5+
## Table of contents
6+
- [Development Setup](#development-setup)
7+
- [How to Contribute](#how-to-contribute)
8+
9+
## Development Setup
10+
11+
To set up your development environment for MetaSSR, choose one of the following methods based on your preferences and system configuration:
12+
13+
### Nix Flake (Recommended)
14+
15+
The fastest way to get started with a fully configured development environment:
16+
17+
1. **Install Nix** (if not already installed):
18+
```bash
19+
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
20+
```
21+
22+
2. **Enable Nix Flakes**:
23+
```bash
24+
mkdir -p ~/.config/nix
25+
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
26+
```
27+
28+
3. **Enter Development Shell**:
29+
```bash
30+
nix develop
31+
```
32+
33+
This will automatically set up Rust, MetaCall, and all required dependencies in an isolated environment.
34+
35+
<!--
36+
### Installation Script
37+
Run `./install.sh` to download MetaCall and link it for most distros without conflicts.
38+
-->
39+
<!--
40+
### Docker
41+
1. Build: `docker build -t metacall/metassr:dev -f Dockerfile.dev .`
42+
2. Run: `docker run --rm -it metacall/metassr:dev bash`
43+
-->
44+
45+
### Manual Installation
46+
47+
If you prefer to set up dependencies manually:
48+
49+
1. **Install Rust Toolchain**:
50+
```bash
51+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
52+
source ~/.cargo/env
53+
```
54+
55+
2. **Install MetaCall Runtime**:
56+
```bash
57+
curl -sL https://raw.githubusercontent.com/metacall/install/master/install.sh | sh
58+
```
59+
60+
3. **Clone and Build**:
61+
```bash
62+
git clone https://github.com/metacall/metassr.git
63+
cd metassr
64+
cargo build --release
65+
```
66+
67+
4. **Verify Installation**:
68+
```bash
69+
cargo test
70+
./target/release/metassr --help
71+
```
72+
573
## How to Contribute
674

775
### 1. Reporting Issues
@@ -36,7 +104,7 @@ To contribute code, follow these steps:
36104

37105
```bash
38106
git add .
39-
git commit -m "Add feature: Description of the feature"
107+
git commit -m "feat: Description of the feature"
40108
```
41109

42110
7. **Push Changes**: Push your changes to your forked repository:
@@ -83,7 +151,7 @@ also, you can test one of web applications that located at [tests](../../tests/)
83151

84152
**Example:**
85153
```bash
86-
$ cargo run --bin metassr-cli -- --root=tests/web-app --debug-mode=all run
154+
$ cargo run --bin metassr -- --root=tests/web-app --debug-mode=all run
87155
```
88156

89157

@@ -96,4 +164,3 @@ Please adhere to our [Code of Conduct](code-of-conduct.md) while participating i
96164
If you have any questions or need assistance, feel free to reach out to us through the project's [discussion forum](https://github.com/metacall/metassr/discussions) or open an issue.
97165

98166
Thank you for contributing to MetaSSR!
99-

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,23 @@ docker run --rm -it metacall/metassr:dev bash
6161

6262
### Nix
6363

64-
```sh
65-
TODO
66-
```
64+
1. **Install Nix** (if not already installed):
65+
```bash
66+
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
67+
```
68+
69+
2. **Enable Nix Flakes**:
70+
```bash
71+
mkdir -p ~/.config/nix
72+
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
73+
```
74+
75+
3. **Enter Development Shell**:
76+
```bash
77+
nix develop
78+
```
79+
80+
This will automatically set up Rust, MetaCall, and all required dependencies in an isolated environment.
6781

6882
## Code of Conduct
6983

@@ -80,4 +94,4 @@ To ensure a positive and inclusive environment, please review our [Code of Condu
8094

8195
## License
8296

83-
MetaSSR is licensed under the [MIT License](LICENSE). See the LICENSE file for more details.
97+
MetaSSR is licensed under the [MIT License](LICENSE). See the LICENSE file for more details.

0 commit comments

Comments
 (0)