Skip to content

Commit

Permalink
add wasm.Dockerfile (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
cataggar committed Aug 24, 2023
1 parent 0636835 commit bd1a2d3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,20 @@ enum Commands {
}

fn list_yml_files(source: &Utf8Path) -> Vec<Utf8PathBuf> {
let exists = source.exists();
println!("source: {source}, exists: {exists}");
let source = source.to_string();
let mut files = Vec::new();
if let Ok(paths) = glob(&format!("{source}/**/*.yml")) {
for path in paths.flatten() {
if let Ok(path) = Utf8PathBuf::from_path_buf(path) {
files.push(path);
match glob(&format!("{source}/**/*.yml")) {
Ok(paths) => {
for path in paths.flatten() {
match Utf8PathBuf::from_path_buf(path) {
Ok(path) => files.push(path),
Err(e) => println!("{:?}", e),
}
}
}
Err(e) => println!("{:?}", e),
}
files
}
Expand Down
4 changes: 4 additions & 0 deletions wasm.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM scratch
COPY target/wasm32-wasi/release/configur.wasm /configur.wasm
ENTRYPOINT ["/configur.wasm"]
CMD ["--help"]

0 comments on commit bd1a2d3

Please sign in to comment.