Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify static buffer size via features #1872

Closed
wants to merge 3 commits into from
Closed

Conversation

SkymanOne
Copy link
Contributor

@SkymanOne SkymanOne commented Aug 9, 2023

An alternative to the #1869 which addresses #1471

Instead of allowing developers to specify the static buffer size, we let them choose the size from the given set of features that we offer:

2GB-buffer = []
1GB-buffer = []
512MB-buffer = []
128MB-buffer = []
16MB-buffer = []
1MB-buffer = []
512kB-buffer = []
128kB-buffer = []

This range of values should cover most of the use cases.

The benefit over the other PR is that devs don't need to mess with the environmental variables of .env files, and the configuration of the static buffer size is trivially simple eliminating any possibility of human error.

We also avoid using build scripts and messing up with the codegen.

@@ -79,3 +79,13 @@ ink-debug = []

# Disable the ink! provided global memory allocator.
no-allocator = ["ink_allocator/no-allocator"]

# Configurable sizes of the static buffer
2GB-buffer = []
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It says that memory is to huge:
image

512MB-buffer = []
128MB-buffer = []
16MB-buffer = []
1MB-buffer = []
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting 1MB it returns another error:
image

@SkymanOne
Copy link
Contributor Author

Closing in favour of #1869

@SkymanOne SkymanOne closed this Aug 18, 2023
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.

2 participants