Skip to content

Commit ae010af

Browse files
authored
Increase limits on component/module/instance types (#947)
Currently these are limited to 1k declarations per type but that's not enough to hold the maximal 100k exports, so increase these limits to 100k. This isn't expected to have too much impact outside of increasing these limits.
1 parent 6da2f74 commit ae010af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/wasmparser/src/limits.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ pub const MAX_WASM_BR_TABLE_SIZE: usize = MAX_WASM_FUNCTION_SIZE;
3737

3838
// Component-related limits
3939
pub const MAX_WASM_MODULE_SIZE: usize = 1024 * 1024 * 1024; //= 1 GiB
40-
pub const MAX_WASM_MODULE_TYPE_DECLS: usize = 1000;
41-
pub const MAX_WASM_COMPONENT_TYPE_DECLS: usize = 1000;
42-
pub const MAX_WASM_INSTANCE_TYPE_DECLS: usize = 1000;
40+
pub const MAX_WASM_MODULE_TYPE_DECLS: usize = 100_000;
41+
pub const MAX_WASM_COMPONENT_TYPE_DECLS: usize = 100_000;
42+
pub const MAX_WASM_INSTANCE_TYPE_DECLS: usize = 100_000;
4343
pub const MAX_WASM_RECORD_FIELDS: usize = 1000;
4444
pub const MAX_WASM_VARIANT_CASES: usize = 1000;
4545
pub const MAX_WASM_TUPLE_TYPES: usize = 1000;

0 commit comments

Comments
 (0)