Skip to content

Commit fc97f2c

Browse files
chore: improve progress graph, add contributing.md
Signed-off-by: Henry Gressmann <[email protected]>
1 parent 8bd7b4f commit fc97f2c

File tree

4 files changed

+70
-38
lines changed

4 files changed

+70
-38
lines changed

.cargo/config.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
[alias]
22
version-dev="workspaces version --no-git-commit --force tinywasm*"
33
dev="run -- -l debug run"
4-
spec-mvp="test --package tinywasm --test mvp -- test_mvp --exact --nocapture --ignored"
4+
5+
test-mvp="test --package tinywasm --test mvp -- test_mvp --exact --nocapture --ignored"
6+
generate-charts="test --package tinywasm --test mvp -- generate_charts --ignored"

CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Common Commands
2+
3+
> To improve the development experience, a number of aliases have been added to the `.cargo/config.toml` file. These can be run using `cargo <command>`.
4+
5+
- **`cargo dev`**\
6+
e.g. `cargo dev -f check ./examples/wasm/call.wat -a i32:0`\
7+
Run the development version of the tinywasm-cli. This is the main command used for developing new features.
8+
9+
- **`cargo generate-charts`**\
10+
Generate test result charts
11+
12+
- **`cargo test-mvp`**\
13+
Run the WebAssembly MVP (1.0) test suite
14+
15+
- **`cargo version-dev`**\
16+
Bump the version to the next dev version. This should be used after a release so test results are not overwritten. Does not create a new github release.
17+
18+
## Workspace Commands
19+
20+
> These commands require the [cargo-workspaces](https://crates.io/crates/cargo-workspaces) crate to be installed.
21+
22+
- **`cargo workspaces version`**\
23+
Bump the version of all crates in the workspace and push changes to git. This is used for releasing new versions on github.
24+
25+
- **`cargo workspaces publish --from-git`**\
26+
Publish all crates in the workspace to crates.io. This should be used a new version has been released on github. After publishing, the version should be bumped to the next dev version.

crates/tinywasm/tests/charts/progress.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ pub fn create_progress_chart(csv_path: &Path, output_path: &Path) -> Result<()>
4040
root_area.fill(&WHITE)?;
4141

4242
let mut chart = ChartBuilder::on(&root_area)
43-
.x_label_area_size(35)
44-
.y_label_area_size(60)
43+
.x_label_area_size(45)
44+
.y_label_area_size(70)
4545
.margin(10)
46+
.margin_top(20)
4647
.caption("MVP TESTSUITE", (FONT, 30.0, FontStyle::Bold))
4748
.build_cartesian_2d((0..(versions.len() - 1) as u32).into_segmented(), 0..max_tests)?;
4849

@@ -52,16 +53,19 @@ pub fn create_progress_chart(csv_path: &Path, output_path: &Path) -> Result<()>
5253
.bold_line_style(&BLACK.mix(0.3))
5354
.max_light_lines(10)
5455
.disable_x_mesh()
55-
.x_labels((versions.len()).min(4))
5656
.y_desc("Tests Passed")
57+
.y_label_style((FONT, 15))
5758
.x_desc("TinyWasm Version")
59+
.x_labels((versions.len()).min(4))
60+
.x_label_style((FONT, 15))
5861
.x_label_formatter(&|x| {
5962
let SegmentValue::CenterOf(value) = x else {
6063
return "".to_string();
6164
};
62-
versions.get(*value as usize).unwrap_or(&"".to_string()).to_string()
65+
let v = versions.get(*value as usize).unwrap_or(&"".to_string()).to_string();
66+
format!("{} ({})", v, data[*value as usize])
6367
})
64-
.axis_desc_style((FONT, 15))
68+
.axis_desc_style((FONT, 15, FontStyle::Bold))
6569
.draw()?;
6670

6771
chart.draw_series(
Lines changed: 32 additions & 32 deletions
Loading

0 commit comments

Comments
 (0)