Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Kogia-sima committed Jul 16, 2020
2 parents 67f2bc2 + d0ef795 commit c809027
Show file tree
Hide file tree
Showing 90 changed files with 2,624 additions and 1,571 deletions.
1,377 changes: 32 additions & 1,345 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ members = [
"sailfish",
"sailfish-compiler",
"sailfish-macros",
"examples",
"integration-tests"
"sailfish-tests/integration-tests"
]
exclude = [
"benches"
"sailfish-tests/fuzzing-tests",
"benches",
"examples"
]

[profile.dev.package.syn]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Dependencies:

```toml
[dependencies]
sailfish = "0.1.3"
sailfish-macros = "0.1.3"
sailfish = "0.2.0"
sailfish-macros = "0.2.0"
```

Template file (templates/hello.stpl):
Expand Down
74 changes: 52 additions & 22 deletions benches/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion benches/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "benches"
version = "0.1.3"
version = "0.2.0"
authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>", "Ryohei Machida <orcinus4627@gmail.com>"]
build = "src/build.rs"
edition = "2018"
Expand All @@ -25,6 +25,7 @@ serde_yaml = "0.8"
tera = { git = "https://github.com/Keats/tera" }
v_htmlescape = "0.9.1"
yarte = { git = "https://github.com/botika/yarte", features = ["bytes-buf", "fixed"] }
bytes = "0.5.5"

[build-dependencies]
ructe = { git = "https://github.com/kaj/ructe" }
Expand Down
5 changes: 3 additions & 2 deletions benches/src/yarte_bytes.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use bytes::BytesMut;
use yarte::TemplateBytes;

pub fn big_table(b: &mut criterion::Bencher<'_>, size: &usize) {
Expand All @@ -10,7 +11,7 @@ pub fn big_table(b: &mut criterion::Bencher<'_>, size: &usize) {
table.push(inner);
}
let t = BigTable { table };
b.iter(|| t.call(109915));
b.iter(|| t.call::<BytesMut>(109915));
}

#[derive(TemplateBytes)]
Expand Down Expand Up @@ -42,7 +43,7 @@ pub fn teams(b: &mut criterion::Bencher<'_>) {
},
],
};
b.iter(|| t.call(239));
b.iter(|| t.call::<BytesMut>(239));
}

#[derive(TemplateBytes)]
Expand Down
4 changes: 2 additions & 2 deletions docs/en/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ In order to use sailfish templates, you have add two dependencies in your `Cargo

```toml
[dependencies]
sailfish = "0.1.3"
sailfish-macros = "0.1.3"
sailfish = "0.2.0"
sailfish-macros = "0.2.0"
```

`sailfish` crate contains runtime for rendering contents, and `sailfish-macros` serves you derive macros to compile and import the template files.
Expand Down
Loading

0 comments on commit c809027

Please sign in to comment.