https://github.com/asynched/catalog-searcher
A catalog search implementation written in 🦀
https://github.com/asynched/catalog-searcher
json rust
Last synced: 2 months ago
JSON representation
A catalog search implementation written in 🦀
- Host: GitHub
- URL: https://github.com/asynched/catalog-searcher
- Owner: asynched
- Created: 2022-01-14T05:54:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-14T06:16:44.000Z (over 4 years ago)
- Last Synced: 2025-12-26T03:55:10.377Z (6 months ago)
- Topics: json, rust
- Language: Rust
- Homepage:
- Size: 183 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Catalog searcher
A demo product catalog searcher written in Rust
## How to build?
### Requirements
- rustc
- cargo
### Building - Development
For executing the app in the development mode you can use the following command:
```sh
$ cargo run
```
### Building - Release
To build the project, run the command bellow:
```sh
$ cargo build --release
```
And then execute the binary
```sh
$ ./target/release/search-test $CATALOG_FILENAME
```
## Executing the app
The app recieves only one command, which is the source file to index the products. It must be a JSON containing a list of products with:
- id
- name
- price
Whereas all of the attributes are strings, below you can se what a product must look like
```json
{ "id": "1", "name": "Foo", "price": "10.24" }
```
### Arguments
| argument | type |
| -------- | ------ |
| filename | string |
### Example
```sh
$ cargo run data/dump.json # Running in development
```
## Author
|  |
| ------------------------------------------------------ |
| [Eder Lima](https://github.com/asynched) |