Skip to main content

stdlib_path

Function stdlib_path 

Source
pub fn stdlib_path() -> &'static str
Expand description

Get the path to the stdlib directory.

On first call, this will extract the embedded stdlib files to the user’s data directory if they don’t already exist. Subsequent calls return the cached path.

The stdlib is extracted to:

  • Linux: ~/.local/share/vibelang/stdlib/
  • macOS: ~/Library/Application Support/vibelang/stdlib/
  • Windows: C:\Users\<User>\AppData\Roaming\vibelang\stdlib\

If the data directory is unavailable, falls back to ~/vibelang/stdlib/.