From b085ee4316fa72d8853992ad2896912d7b8c6973 Mon Sep 17 00:00:00 2001 From: Josh Heinrichs Date: Thu, 27 Nov 2025 22:55:07 -0600 Subject: [PATCH] Bump memory limit In some projects $NIX_CFLAGS_COMPILE now exceeds 10k. Maybe we should make this configurable, but it also feels reasonable to just support whatever the system supports. The maximum length appears to depend on the platform -- PAGE_SIZE * 32 on Linux (usually 128 KiB), and capped by ARG_MAX on macOS (256 KiB across all args). 64 KiB ought to be enough for anyone. --- src/lang.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang.rs b/src/lang.rs index e9306ad..d9b369e 100644 --- a/src/lang.rs +++ b/src/lang.rs @@ -99,7 +99,7 @@ impl ShadowLang { // The default limit of 256 then means a limit of 256 bytes of string per invocation. // We'll increase this to 8k, in case people want to embed an RSA cert or something (don't // construe this as an endorsement of that plan). - restrictions.memory_limit = 8192; + restrictions.memory_limit = 65536; let interp = ketos::Builder::new() .restrict(restrictions)