Skip to content

Commit 0bc3149

Browse files
committed
Reposiroty clean up
1 parent 89754a0 commit 0bc3149

File tree

136 files changed

+21
-2402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+21
-2402
lines changed

Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ resolver = "2"
55
members = [
66
"ast",
77
"cli",
8-
"wasm-v-translator",
9-
"wat-codegen",
108
"wasm-codegen",
119
"inference",
1210
"tests",
@@ -25,8 +23,6 @@ repository = "https://github.com/Inferara/inference"
2523
inference = { path = "./inference", version = "0.0.1" }
2624
inference-ast = { path = "./ast", version = "0.0.1" }
2725
inference-cli = { path = "./cli", version = "0.0.1" }
28-
inference-wasm-v-translator = { path = "./wasm-v-translator", version = "0.0.1" }
29-
inference-wat-codegen = { path = "./wat-codegen", version = "0.0.1" }
3026
inference-wasm-codegen = { path = "./wasm-codegen", version = "0.0.1" }
3127
inference-tests = { path = "./tests", version = "0.0.1" }
3228
inference-playground-server = { path = "./playground-server", version = "0.0.1" }

cli/src/main.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
3030
mod parser;
3131
use clap::Parser;
32-
use inference::{analyze, codegen, parse, wasm_to_v};
32+
use inference::{analyze, codegen, parse};
3333
use parser::Cli;
3434
use std::{
3535
fs,
@@ -117,26 +117,26 @@ fn main() {
117117
}
118118
println!("WASM generated at: {}", wasm_file_path.to_string_lossy());
119119
}
120-
if args.generate_v_output {
121-
match wasm_to_v(source_fname, &wasm) {
122-
Ok(v_output) => {
123-
let v_file_path = output_path.join(format!("{source_fname}.v"));
124-
if let Err(e) = fs::create_dir_all(&output_path) {
125-
eprintln!("Failed to create output directory: {e}");
126-
process::exit(1);
127-
}
128-
if let Err(e) = fs::write(&v_file_path, v_output) {
129-
eprintln!("Failed to write V file: {e}");
130-
process::exit(1);
131-
}
132-
println!("V generated at: {}", v_file_path.to_string_lossy());
133-
}
134-
Err(e) => {
135-
eprintln!("WASM->V translation failed: {e}");
136-
process::exit(1);
137-
}
138-
}
139-
}
120+
// if args.generate_v_output {
121+
// match wasm_to_v(source_fname, &wasm) {
122+
// Ok(v_output) => {
123+
// let v_file_path = output_path.join(format!("{source_fname}.v"));
124+
// if let Err(e) = fs::create_dir_all(&output_path) {
125+
// eprintln!("Failed to create output directory: {e}");
126+
// process::exit(1);
127+
// }
128+
// if let Err(e) = fs::write(&v_file_path, v_output) {
129+
// eprintln!("Failed to write V file: {e}");
130+
// process::exit(1);
131+
// }
132+
// println!("V generated at: {}", v_file_path.to_string_lossy());
133+
// }
134+
// Err(e) => {
135+
// eprintln!("WASM->V translation failed: {e}");
136+
// process::exit(1);
137+
// }
138+
// }
139+
// }
140140
}
141141
process::exit(0);
142142
}

inference/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ tree-sitter.workspace = true
1313
tree-sitter-inference.workspace = true
1414
inference-ast.workspace = true
1515
inference-wasm-codegen.workspace = true
16-
inference-wasm-v-translator.workspace = true

inference/src/lib.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,3 @@ pub fn wat_to_wasm(wat: &str) -> anyhow::Result<Vec<u8>> {
6363
let wasm = module.encode()?;
6464
Ok(wasm)
6565
}
66-
67-
/// Translates WebAssembly binary format (WASM) to Coq format.
68-
///
69-
/// # Errors
70-
///
71-
/// This function will return an error if the translation process fails.
72-
pub fn wasm_to_v(mod_name: &str, wasm: &Vec<u8>) -> anyhow::Result<String> {
73-
if let Ok(v) =
74-
inference_wasm_v_translator::wasm_parser::translate_bytes(mod_name, wasm.as_slice())
75-
{
76-
Ok(v)
77-
} else {
78-
Err(anyhow::anyhow!("Error translating WebAssembly to V"))
79-
}
80-
}

wasm-v-translator/Cargo.toml

Lines changed: 0 additions & 15 deletions
This file was deleted.

wasm-v-translator/src/lib.rs

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)