Skip to content

Commit

Permalink
Expose some Module APIs that measure various lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
graydon committed Feb 29, 2024
1 parent 0ed3f3d commit 3f5493c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/wasmi/src/module/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,19 @@ impl Module {
}

/// Returns the number of non-imported functions of the [`Module`].
pub(crate) fn len_funcs(&self) -> usize {
pub fn len_funcs(&self) -> usize {
self.funcs.len()
}
/// Returns the number of non-imported tables of the [`Module`].
pub(crate) fn len_tables(&self) -> usize {
pub fn len_tables(&self) -> usize {
self.tables.len()
}
/// Returns the number of non-imported linear memories of the [`Module`].
pub(crate) fn len_memories(&self) -> usize {
pub fn len_memories(&self) -> usize {
self.memories.len()
}
/// Returns the number of non-imported global variables of the [`Module`].
pub(crate) fn len_globals(&self) -> usize {
pub fn len_globals(&self) -> usize {
self.globals.len()
}

Expand Down

0 comments on commit 3f5493c

Please sign in to comment.