• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

henrythasler / rust-tiny-wasm / 23354992303

20 Mar 2026 05:35PM UTC coverage: 86.175% (-7.6%) from 93.74%
23354992303

push

github

web-flow
Merge pull request #3 from henrythasler/feature/wasmparser

Feature/wasmparser

90 of 136 new or added lines in 6 files covered. (66.18%)

2 existing lines in 1 file now uncovered.

374 of 434 relevant lines covered (86.18%)

6.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main.rs
1
use clap::Parser;
2
use std::fs;
3
use std::path::Path;
4
use tiny_wasm::*;
5

6
/// Simple program to greet a person
7
#[derive(Parser, Debug)]
8
#[command(version, about, long_about = None, trailing_var_arg = true)]
9
pub struct Args {
10
    /// Path to wasm-module
11
    #[arg(short, long)]
12
    module: String,
13

14
    /// Function to call
15
    #[arg(short, long, default_value_t = String::from("_start"))]
16
    function: String,
17
}
18

NEW
19
fn main() -> Result<()> {
×
20
    // parse command line arguments
21
    let args = Args::parse();
×
22

23
    // load, compile and instantiate WebAssembly module
NEW
24
    let module = fs::read(Path::new(&args.module)).unwrap();
×
NEW
25
    let instance = get_module_instance(&module)?;
×
26

27
    // get the function pointer and call the function
NEW
28
    let entrypoint = unsafe { instance.get_function::<fn() -> i32>(&args.function) };
×
NEW
29
    println!("{}", entrypoint());
×
30
    Ok(())
×
31
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc