Skip to content

Commit 47bea2e

Browse files
authored
Rename generate-raw crate to witx-bindgen (#49)
1 parent 4b65533 commit 47bea2e

File tree

11 files changed

+13
-13
lines changed

11 files changed

+13
-13
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
submodules: true
4242
- name: Install Rust
4343
run: rustup update stable && rustup default stable
44-
- run: cargo test -p generate-raw
44+
- run: cargo test -p witx-bindgen

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "crates/generate-raw/WASI"]
2-
path = crates/generate-raw/WASI
1+
[submodule "crates/witx-bindgen/WASI"]
2+
path = crates/witx-bindgen/WASI
33
url = https://github.com/WebAssembly/WASI

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ readme = "README.md"
1212
documentation = "https://docs.rs/wasi"
1313

1414
[workspace]
15-
members = ['crates/generate-raw', 'crates/wasi-ephemeral']
15+
members = ['crates/witx-bindgen', 'crates/wasi-ephemeral']
1616

1717
[dependencies]
1818
# When built as part of libstd

crates/wasi-ephemeral/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ keywords = ["webassembly", "wasm"]
1111
repository = "https://github.com/bytecodealliance/wasi"
1212

1313
[build-dependencies]
14-
generate-raw = { path = "../generate-raw", features = ["multi-module"] }
14+
witx-bindgen = { path = "../witx-bindgen", features = ["multi-module"] }
1515

1616
[features]
1717
default = ["std"]

crates/wasi-ephemeral/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::{
55
path::{Path, PathBuf},
66
};
77

8-
const WITX_ROOT: &str = "../generate-raw/WASI/phases/ephemeral/witx";
8+
const WITX_ROOT: &str = "../witx-bindgen/WASI/phases/ephemeral/witx";
99
const WITX_MODULES: &[&str] = &[
1010
"args", "clock", "environ", "fd", "path", "poll", "proc", "random", "sched", "sock",
1111
];
@@ -21,7 +21,7 @@ fn main() {
2121
.to_owned()
2222
})
2323
.collect();
24-
let out = generate_raw::generate(&witx_paths);
24+
let out = witx_bindgen::generate(&witx_paths);
2525
write!(f, "{}", out).unwrap();
2626
for p in &witx_paths {
2727
println!("cargo:rerun-if-changed={}", p.display());

crates/generate-raw/Cargo.toml renamed to crates/witx-bindgen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "generate-raw"
2+
name = "witx-bindgen"
33
version = "0.0.0"
44
publish = false
55
authors = ["The Cranelift Project Developers"]

crates/generate-raw/src/lib.rs renamed to crates/witx-bindgen/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn generate<P: AsRef<Path>>(witx_paths: &[P]) -> String {
1212
"\
1313
// This file is automatically generated, DO NOT EDIT
1414
//
15-
// To regenerate this file run the `crates/generate-raw` command
15+
// To regenerate this file run the `crates/witx-bindgen` command
1616
1717
use core::mem::MaybeUninit;
1818

crates/generate-raw/src/main.rs renamed to crates/witx-bindgen/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ use std::path::PathBuf;
44
fn main() {
55
let wasi_dir: PathBuf = env::args_os().nth(1).unwrap().into();
66
let witx_path = wasi_dir.join("phases/snapshot/witx/wasi_snapshot_preview1.witx");
7-
print!("{}", generate_raw::generate(&[witx_path]));
7+
print!("{}", witx_bindgen::generate(&[witx_path]));
88
}

crates/generate-raw/tests/verify.rs renamed to crates/witx-bindgen/tests/verify.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
fn assert_same_as_src() {
33
let actual = include_str!("../../../src/lib_generated.rs");
44
let expected =
5-
generate_raw::generate(&["WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx"]);
5+
witx_bindgen::generate(&["WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx"]);
66
if actual == expected {
77
return;
88
}
@@ -12,7 +12,7 @@ fn assert_same_as_src() {
1212
the generate `raw.rs` does not match the actual source `raw.rs`, it's
1313
recommended to run this command from the root of the repository:
1414
15-
cargo run -p generate-raw crates/generate-raw/WASI > src/lib_generated.rs
15+
cargo run -p witx-bindgen crates/witx-bindgen/WASI > src/lib_generated.rs
1616
1717
"
1818
);

0 commit comments

Comments
 (0)