Skip to content

Commit

Permalink
chore: update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Dec 26, 2023
1 parent 985ed3c commit 5ef9080
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 139 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ Want to see a client in a language we don't support? [Open an issue](https://git

See each client's README for installation instructions.

Currently, you'll need to build the dynamic library and the library locally and install it for your architecture. This is a temporary solution until we package and distribute the libraries using their respective package managers.

## Use Cases

Why you may prefer to use a client-side SDK over our server-side SDKs:
Expand Down
59 changes: 7 additions & 52 deletions flipt-client-node/README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,21 @@
# Flipt Client Node

The `flipt-client-node` directory contains the TypeScript source code for the Flipt client-side evaluation client.
[![npm](https://img.shields.io/npm/v/@flipt-io/flipt-client?label=%40flipt-io%2Fflipt-client)](https://www.npmjs.com/package/@flipt-io/flipt-client)

## Installation

Currently, to use this client, you'll need to build the dynamic library and the Node package locally and install it. This is a temporary solution until we can figure out a better way to package and distribute the libraries.

The dynamic library will contain the functionality necessary for the client to make calls to the Flipt engine via FFI. See [flipt-engine](../flipt-engine) for more information on the Flipt engine and FFI.

### Prerequisites

- [Rust](https://www.rust-lang.org/tools/install)
- [Node](https://nodejs.org/en/download/)
- [Make](https://www.gnu.org/software/make/)

### Automated Build

1. Build and copy the dynamic library to the `flipt-client-node` directory for your platform. You can do this by running the following command from the root of the repository:

```bash
make node
```

2. Install the package locally. You can do this by running the following command from the `flipt-client-node` directory:

```bash
npm install -g flipt-client-{version}.tgz
```
The `flipt-client-node` directory contains the TypeScript source code for the Flipt [client-side evaluation](https://www.flipt.io/docs/integration/client) client.

### Manual Build

1. Build the Rust dynamic library

```bash
cargo build --release
```

This should generate a `target/` directory in the root of this repository, which contains the dynamically linked library built for your platform.

2. You'll need to copy the dynamic library to the `flipt-client-node/ext/$OS_$ARCH/` directory. This is a temporary solution until we can figure out a better way to package the libraries with the package.
The `path/to/lib` will be the path to the dynamic library which will have the following paths depending on your platform.
- **Linux**: `{REPO_ROOT}/target/release/libfliptengine.so`
- **Windows**: `{REPO_ROOT}/target/release/libfliptengine.dll`
- **MacOS**: `{REPO_ROOT}/target/release/libfliptengine.dylib`
3. You can then build the package and install it locally. You can do this by running the following command from the `flipt-client-node` directory:
## Installation

```bash
npm install
npm run build
npm pack
npm install -g flipt-client-{version}.tgz
```
```bash
npm install @flipt-io/flipt-client
```

## Usage

In your Node code you can import this client and use it as so:

```typescript
import { FliptEvaluationClient } from 'flipt-client';
import { FliptEvaluationClient } from '@flipt-io/flipt-client';

// namespace is the first positional argument and is optional here and will have a value of "default" if not specified.
// engine_opts is the second positional argument and is also optional, the structure is:
Expand Down
48 changes: 6 additions & 42 deletions flipt-client-python/README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,14 @@
# Flipt Client Python

The `flipt-client-python` directory contains the Python source code for the Flipt client-side evaluation client.
[![pypi](https://img.shields.io/pypi/v/flipt-client.svg)](https://pypi.org/project/flipt-client)

## Installation

Currently, to use this client, you'll need to build the dynamic library and the package locally and install it. This is a temporary solution until we can figure out a better way to package and distribute the libraries.

The dynamic library will contain the functionality necessary for the client to make calls to the Flipt engine via FFI. See [flipt-engine](../flipt-engine) for more information on the Flipt engine and FFI.

### Prerequisites

- [Rust](https://www.rust-lang.org/tools/install)
- [Python](https://www.python.org/downloads/)
- [Make](https://www.gnu.org/software/make/)
- [poetry](https://python-poetry.org/docs/#installation)

### Automated Build

1. Build and copy the dynamic library to the `flipt-client-python/ext` directory for your platform. This will also build and install the `flipt-client` Python package. You can do this by running the following command from the root of the repository:

```bash
make python
```

### Manual Build
The `flipt-client-python` directory contains the Python source code for the Flipt [client-side evaluation](https://www.flipt.io/docs/integration/client) client.

1. Build the Rust dynamic library

```bash
cargo build --release
This should generate a `target/` directory in the root of this repository, which contains the dynamically linked library built for your platform.
2. You'll need to copy the dynamic library to the `flipt-client-python/ext/$OS_$ARCH/` directory. This is a temporary solution until we can figure out a better way to package the libraries with the package.
The `path/to/lib` will be the path to the dynamic library which will have the following paths depending on your platform.
- **Linux**: `{REPO_ROOT}/target/release/libfliptengine.so`
- **Windows**: `{REPO_ROOT}/target/release/libfliptengine.dll`
- **MacOS**: `{REPO_ROOT}/target/release/libfliptengine.dylib`
3. You can then build the package and install it locally. You can do this by running the following command from the `flipt-client-python` directory:
## Installation

```bash
poetry install
```
```bash
pip install flipt-client
```

## Usage

Expand Down
49 changes: 6 additions & 43 deletions flipt-client-ruby/README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,14 @@
# Flipt Client Ruby

The `flipt-client-ruby` directory contains the Ruby source code for the Flipt client-side evaluation client.
[![Gem Version](https://badge.fury.io/rb/flipt_client.svg)](https://badge.fury.io/rb/flipt_client)

## Installation

Currently, to use this client, you'll need to build the dynamic library and the gem locally and install it. This is a temporary solution until we can figure out a better way to package and distribute the libraries.

The dynamic library will contain the functionality necessary for the client to make calls to the Flipt engine via FFI. See [flipt-engine](../flipt-engine) for more information on the Flipt engine and FFI.

### Prerequisites

- [Rust](https://www.rust-lang.org/tools/install)
- [Ruby](https://www.ruby-lang.org/en/documentation/installation/)
- [Make](https://www.gnu.org/software/make/)

### Automated Build

1. Build and copy the dynamic library to the `flipt-client-ruby/lib/ext` directory for your platform. This will also build and install the `flipt_client` gem on your local machine. You can do this by running the following command from the root of the repository:

```bash
make ruby
```

### Manual Build

1. Build the Rust dynamic library
The `flipt-client-ruby` directory contains the Ruby source code for the Flipt [client-side evaluation](https://www.flipt.io/docs/integration/client) client.

```bash
cargo build --release
```

This should generate a `target/` directory in the root of this repository, which contains the dynamically linked library built for your platform.

2. You'll need to copy the dynamic library to the `flipt-client-ruby/lib/ext/$OS_$ARCH/` directory. This is a temporary solution until we can figure out a better way to package the libraries with the gem.
The `path/to/lib` will be the path to the dynamic library which will have the following paths depending on your platform.
- **Linux**: `{REPO_ROOT}/target/release/libfliptengine.so`
- **Windows**: `{REPO_ROOT}/target/release/libfliptengine.dll`
- **MacOS**: `{REPO_ROOT}/target/release/libfliptengine.dylib`
3. You can then build the gem and install it locally. You can do this by running the following command from the `flipt-client-ruby` directory:
## Installation

```bash
rake build
gem install pkg/flipt_client-{version}.gem
```
```bash
gem install flipt_client
```

## Usage

Expand Down

0 comments on commit 5ef9080

Please sign in to comment.