Skip to content

feat: add BUF_WASM_MAX_MEMORY_BYTES env var to configure WASM memory limit#4504

Closed
paultyng wants to merge 1 commit into
bufbuild:mainfrom
paultyng:pt-wasm-memory-config
Closed

feat: add BUF_WASM_MAX_MEMORY_BYTES env var to configure WASM memory limit#4504
paultyng wants to merge 1 commit into
bufbuild:mainfrom
paultyng:pt-wasm-memory-config

Conversation

@paultyng
Copy link
Copy Markdown

The WASM plugin sandbox is hardcoded to 512 MiB. Larger check plugins (e.g., those embedding the AEP api-linter with transitive gRPC deps) can OOM during init before any proto analysis begins.

Add BUF_WASM_MAX_MEMORY_BYTES environment variable to override the default. The WithMaxMemoryBytes runtime option already exists but was never exposed to users.

…limit

The WASM plugin sandbox is hardcoded to 512 MiB. Larger check plugins
(e.g., those embedding the AEP api-linter with transitive gRPC deps)
can OOM during init before any proto analysis begins.

Add BUF_WASM_MAX_MEMORY_BYTES environment variable to override the
default. The WithMaxMemoryBytes runtime option already exists but was
never exposed to users.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 24, 2026

CLA assistant check
All committers have signed the CLA.

@emcfarlane
Copy link
Copy Markdown
Contributor

Hey @paultyng, thanks for the PR. From your issue this morning we bumped the memory limits from 512MiB to 1GiB: #4503. This will get set in the next release. Looked into exposing it as a variable but this would give us potentially different limits across the CLI and the BSR. Ideally plugins work the same wherever they are run. For your use case the AEP should work out of the box now. Does this approach work for you?

@paultyng paultyng closed this Apr 25, 2026
@paultyng
Copy link
Copy Markdown
Author

@emcfarlane sorry I missed that! thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants