File: README.md

package info (click to toggle)
rust-hstr 0%2B20250327-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,592 kB
  • sloc: makefile: 24; sh: 1
file content (52 lines) | stat: -rw-r--r-- 1,342 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# par-core

A wrapper for various parallelization library for Rust.
This crate currently supports

- [`chili`](https://github.com/dragostis/chili)
- [`rayon`](https://github.com/rayon-rs/rayon)
- Disable parallelization.

# Usage

If you are developing a library, you should not force the parallelization library, and let the users choose the parallelization library.

## Final application

If you are developing a final application, you can use cargo feature to select the parallelization library.

### `chili`

```toml
[dependencies]
par-core = { version = "1.0.3", features = ["chili"] }
```

### `rayon`

```toml
[dependencies]
par-core = { version = "1.0.3", features = ["rayon"] }
```

### Disable parallelization

```toml
[dependencies]
par-core = { version = "1.0.3", default-features = false }
```

## Library developers

If you are developing a library, you can simply depend on `par-core` without any features.
**Note**: To prevent a small mistake of end-user making the appplication slower, `par-core` emits a error message using a default feature.
So if you are a library developer, you should specify `default-features = false`.

```toml
[dependencies]
par-core = { version = "1.0.3", default-features = false }
```

# License

This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.