-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic
wasm
API dissect_packet
and CI actions
- Added a basic API `dissect_packet` if configured to build with `wasm` feature. This is a demonstration of the basic `wasm` feature. - Fixed issue with compilation of examples when `wasm` feature was enabled. - Added some simple tests when building with `wasm` feature. Co-authored-by: csking101 <chinmayasahu101@gmail.com> Signed-off-by: Abhijit Gadgil <gabhijit@iitbombay.org>
- Loading branch information
Showing
7 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//! Test suite for Node JS | ||
#![cfg(target_arch = "wasm32")] | ||
|
||
extern crate wasm_bindgen_test; | ||
use wasm_bindgen_test::*; | ||
|
||
#[wasm_bindgen_test] | ||
fn simple_dissect_test() { | ||
let bytestream = "003096e6fc3900309605283888470001ddff45c0002800030000ff06a4e80a0102010a2200012af90017983210058dd58ea55010102099cd00000000"; | ||
scalpel::dissect_packet(bytestream.to_string()); | ||
assert!(true); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//! Test suite for the Web and headless browsers. | ||
#![cfg(target_arch = "wasm32")] | ||
|
||
extern crate wasm_bindgen_test; | ||
use wasm_bindgen_test::*; | ||
|
||
wasm_bindgen_test_configure!(run_in_browser); | ||
|
||
#[wasm_bindgen_test] | ||
fn simple_dissect_test() { | ||
let bytestream = "003096e6fc3900309605283888470001ddff45c0002800030000ff06a4e80a0102010a2200012af90017983210058dd58ea55010102099cd00000000"; | ||
scalpel::dissect_packet(bytestream.to_string()); | ||
assert!(true); | ||
} |