Skip to content

Commit

Permalink
feat(query-engine-wasm): [analyse] exclude Wasm memory directives fro…
Browse files Browse the repository at this point in the history
…m "pnpm crates"
  • Loading branch information
jkomyno committed Jan 9, 2024
1 parent 068233b commit 4220112
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions query-engine/query-engine-wasm/analyse/src/crates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,19 @@ function parseEntry({ name, ...rest }: TwiggyEntry): ParsedTwiggyEntry | undefin
'custom section',
'wasm magic'
]

const stringsToAvoid = [
// memory utilities
'memmove',
'memset',
'memcpy',
'memcmp',
]

if (
prefixesToAvoid.some(prefix => name.startsWith(prefix))
|| substringsToAvoid.some(substring => name.includes(substring))
|| stringsToAvoid.includes(name)
) {
return undefined
}
Expand Down

0 comments on commit 4220112

Please sign in to comment.