add SourceCode wrapping str for enforcing source code length limits at parsing boundaries

I'm actually quite happy with this API design. a little zero-cost wrapper that makes you _think_ when you need to think.
This commit is contained in:
りき萌 2024-08-22 20:27:25 +02:00
parent 3913254215
commit 6c88a041ea
7 changed files with 66 additions and 16 deletions

View file

@ -33,6 +33,9 @@ interval_seconds = 10
# Technically clients may override these settings with some hackery, but then the server may not
# register changes they make to the canvas.
# Maximum length of source code.
max_source_code_len = 65536
# Maximum amount of source code chunks.
# This should be at least 2, to allow for loading in a standard library chunk.
max_chunks = 2