/anchor-space

A tool to calculate Anchor space requirement by providing the program's state

Primary LanguageJavaScript

Anchor Space Calculator

A simple tool written in pure JS to calculate a space requirement for an Anchor state by simply entering the Rust code in the tool.

It supports:

  • Two-dimensional vectors
  • Custom types (enums and structs)
  • Options
  • Strings
  • vector of custom types
  • vector of Strings, primitives
  • Arrays
  • Primitives

It doesn't yet support:

  • Options other than Option of String and Primitives
  • Two-dimensional vectors of custom type
  • Custom types inside custom types
  • Arrays of Custom Type

How to use

The tool is written in vanilla JS and CSS. You won't need to install any dependency. Just clone the repo and run the index.html file in a browser.

Tool Active at

https://0xshuk.github.io/anchor-space