Skip to content

Commit

Permalink
Merge pull request #68 from LSViana/67-improve-the-readme
Browse files Browse the repository at this point in the history
Improve the README
  • Loading branch information
LSViana authored Dec 1, 2023
2 parents ea43424 + d8213c2 commit cb40f5e
Showing 1 changed file with 41 additions and 5 deletions.
46 changes: 41 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,31 @@ https://github.com/LSViana/ydotnet/assets/21217790/cdb6023d-25d1-4951-82ae-b079d

# Installation

> This section is a WIP, the project has not yet been published to [NuGet](https://www.nuget.org/).
For every scenario, you must start by installing the core of the library.

To do so, in the project directory (where you `.csproj` lives), execute:

```shell
dotnet add package YDotNet
```

Then, install the platform-specific package in order to get the binaries.

| Package | Platform |
|-----------------------------------------------------------------------------|----------|
| [YDotNet.Native.Win32](https://www.nuget.org/packages/YDotNet.Native.Win32) | Windows |
| [YDotNet.Native.Linux](https://www.nuget.org/packages/YDotNet.Native.Linux) | Linux |
| [YDotNet.Native.MacOS](https://www.nuget.org/packages/YDotNet.Native.MacOS) | macOS |

And you may also install the following packages to get extra features.

| Package | Description |
|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
| [YDotNet.Extensions](https://www.nuget.org/packages/YDotNet.Extensions) | Extension methods to make some operations easier. |
| [YDotNet.Server](https://www.nuget.org/packages/YDotNet.Server) | Provides the hosting infrastructure for all communication channels, like WebSocket. |
| [YDotNet.Server.WebSockets](https://www.nuget.org/packages/YDotNet.Server.WebSockets) | Use WebSockets as the communication channel between clients. |
| [YDotNet.Server.MongoDB](https://www.nuget.org/packages/YDotNet.Server.MongoDB) | Use MongoDB as a persistence layer. |
| [YDotNet.Server.Redis](https://www.nuget.org/packages/YDotNet.Server.Redis) | Use Redis as a persistence layer. |

# Getting Started

Expand Down Expand Up @@ -62,10 +86,22 @@ var text = remoteText.String(remoteTransaction);

# Development Setup

> This section is a WIP, but you should be able to run the project through the unit tests after
> building a dynamic library for your operating system by adding `cdylib` to the `crate-type` in
> the [`Cargo.toml`](https://github.com/y-crdt/y-crdt/blob/main/yffi/Cargo.toml#L19) file of the
> yffi` library.
To contribute with this library, you'll need to install the following tools:

- [.NET SDK](https://dotnet.microsoft.com/download/dotnet/)
- [Rust](https://www.rust-lang.org/tools/install)

Then you should clone the [`y-crdt`](https://github.com/y-crdt/y-crdt) repository. With the repository
cloned and the tools installed, you'll be able to:

1. Make changes to the Rust or C# library;
2. Re-build the Rust and C# binaries;
- Be aware that you'll need to use
[`crate-type=cdylib`](https://github.com/y-crdt/y-crdt/blob/main/yffi/Cargo.toml#L19)
on the `Cargo.toml` file to get a dynamic library that's callable by C#.
3. Test your changes and repeat.

Then you're ready to go! Feel free to contribute, open issues, and ask questions.

# Tests

Expand Down

0 comments on commit cb40f5e

Please sign in to comment.