Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 70 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,74 @@

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.

## Table of contents
- [Development Setup](#development-setup)
- [How to Contribute](#how-to-contribute)

## Development Setup

To set up your development environment for MetaSSR, choose one of the following methods based on your preferences and system configuration:

### Nix Flake (Recommended)

The fastest way to get started with a fully configured development environment:

1. **Install Nix** (if not already installed):
```bash
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
```

2. **Enable Nix Flakes**:
```bash
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
```

3. **Enter Development Shell**:
```bash
nix develop
```

This will automatically set up Rust, MetaCall, and all required dependencies in an isolated environment.

<!--
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hulxv I've commented out Installation Script & Docker sections for now. Can we make an install.sh or setup.sh file for that and test it? should i do that? And for docker, I think the Image has problems now, correct me if i'm wrong, when our docker is stable for development we could remove the comment.

### Installation Script
Run `./install.sh` to download MetaCall and link it for most distros without conflicts.
-->
<!--
### Docker
1. Build: `docker build -t metacall/metassr:dev -f Dockerfile.dev .`
2. Run: `docker run --rm -it metacall/metassr:dev bash`
-->

### Manual Installation

If you prefer to set up dependencies manually:

1. **Install Rust Toolchain**:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
```

2. **Install MetaCall Runtime**:
```bash
curl -sL https://raw.githubusercontent.com/metacall/install/master/install.sh | sh
```

3. **Clone and Build**:
```bash
git clone https://github.com/metacall/metassr.git
cd metassr
cargo build --release
```

4. **Verify Installation**:
```bash
cargo test
./target/release/metassr --help
```

## How to Contribute

### 1. Reporting Issues
Expand Down Expand Up @@ -36,7 +104,7 @@ To contribute code, follow these steps:

```bash
git add .
git commit -m "Add feature: Description of the feature"
git commit -m "feat: Description of the feature"
```

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

**Example:**
```bash
$ cargo run --bin metassr-cli -- --root=tests/web-app --debug-mode=all run
$ cargo run --bin metassr -- --root=tests/web-app --debug-mode=all run
```


Expand All @@ -96,4 +164,3 @@ Please adhere to our [Code of Conduct](code-of-conduct.md) while participating i
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.

Thank you for contributing to MetaSSR!

22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,23 @@ docker run --rm -it metacall/metassr:dev bash

### Nix

```sh
TODO
```
1. **Install Nix** (if not already installed):
```bash
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
```

2. **Enable Nix Flakes**:
```bash
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
```

3. **Enter Development Shell**:
```bash
nix develop
```

This will automatically set up Rust, MetaCall, and all required dependencies in an isolated environment.

## Code of Conduct

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

## License

MetaSSR is licensed under the [MIT License](LICENSE). See the LICENSE file for more details.
MetaSSR is licensed under the [MIT License](LICENSE). See the LICENSE file for more details.
2 changes: 1 addition & 1 deletion crates/metassr-watcher/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pub mod utils;

use notify::RecursiveMode;
use notify_debouncer_full::{self, DebounceEventResult, DebouncedEvent};
use std::{ path::Path, time::Duration};
use std::{path::Path, time::Duration};
use tokio::sync::broadcast;
use utils::{format_event, is_relevant_event};

Expand Down
12 changes: 5 additions & 7 deletions metassr-cli/src/cli/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ impl Exec for Builder {
);
}

if (_metacall)() == 0 {
info!(
target = "builder",
message = "Building is completed",
time = format!("{}ms", instant.elapsed().as_millis())
);
}
info!(
target = "builder",
message = "Building is completed",
time = format!("{}ms", instant.elapsed().as_millis())
);

Ok(())
}
Expand Down
Loading