<commit_before># Generator-rs

rust generator library

use the dev version on master

```toml
[dependencies.generator]
git = "https://github.com/Xudong-Huang/generator-rs.git"
```


## Usage
```rust
#[macro_use]
extern crate generator;

unsafe fn fib(a: u32, b: u32) -> u32 {
    let (mut a, mut b) = (a, b);
    while b < 200 {
        std::mem::swap(&mut a, &mut b);
        b = a + b;
        _yield_!(b);
    }
    10000
}

fn main() {
    let g = generator!(fib(0, 1));

    for i in g {
        println!("{}", i);
    }
}

```

## Output
```
1
2
3
5
8
13
21
34
55
89
144
233
10000
```

## Notices

* This crate supports platforms in

    - x86_64

* It depends on the contex libaray, currently the context library need
  some patch to compile the generator lib
<commit_msg>add Goals<commit_after># Generator-rs

rust generator library

use the dev version on master

```toml
[dependencies.generator]
git = "https://github.com/Xudong-Huang/generator-rs.git"
```


## Usage
```rust
#[macro_use]
extern crate generator;

unsafe fn fib(a: u32, b: u32) -> u32 {
    let (mut a, mut b) = (a, b);
    while b < 200 {
        std::mem::swap(&mut a, &mut b);
        b = a + b;
        _yield_!(b);
    }
    10000
}

fn main() {
    let g = generator!(fib(0, 1));

    for i in g {
        println!("{}", i);
    }
}

```

## Output
```
1
2
3
5
8
13
21
34
55
89
144
233
10000
```

## Goals

- [x] Basic single threaded support
- [ ] Stack Cache support 
- [ ] Multithreaded support
- [ ] 1M+ generators running with N:M
- [ ] basic library for Asynchronous I/O

## Notices

* This crate supports platforms in

    - x86_64

* It depends on the contex libaray, currently the context library need
  some patch to compile the generator lib

{'fraction_non_alphanumeric': 0.14063400576368876, 'fraction_numerical': 0.05360230547550432, 'mean_word_length': 2.6470588235294117, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6752569', 'n_tokens_mistral': 724, 'n_tokens_neox': 636, 'n_words': 218}