diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2024-05-15 13:38:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-15 13:38:13 +0200 |
| commit | d9cdd0b53c870bf7d9d69b854b8da2692d152871 (patch) | |
| tree | 0ba0bf6a38ce391495ef42e4f22954aafe3fbbc1 /examples/rust/analyze.py | |
| parent | e771c6df456f6c6655a7850defffdbb5cc574461 (diff) | |
feat: v0.7.0 (#13)
* Remove all unsafe code
* Refactor interpreter loop
* Optimize Call-frames
* Remove unnecessary reference counter data from store
---------
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'examples/rust/analyze.py')
| -rw-r--r-- | examples/rust/analyze.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/rust/analyze.py b/examples/rust/analyze.py index a134a00..a813c1c 100644 --- a/examples/rust/analyze.py +++ b/examples/rust/analyze.py @@ -2,15 +2,14 @@ import re import sys from collections import Counter -seq_len = 5 - # Check if a file path was provided -if len(sys.argv) < 2: - print("Usage: python script.py path/to/yourfile.wat") +if len(sys.argv) < 3: + print("Usage: python script.py sequence_length path/to/yourfile.wat") sys.exit(1) # The first command line argument is the file path -file_path = sys.argv[1] +seq_len = int(sys.argv[1]) +file_path = sys.argv[2] # Regex to match WASM operators, adjust as necessary operator_pattern = re.compile(r"\b[a-z0-9_]+\.[a-z0-9_]+\b") |
