Galfus

Code

A syntax-highlighting code block component powered by Shiki, supporting Galfus Script natively.

Galfus Script (Native Grammar)

main.gfs
import { println } from 'std/io'

export fn main(args: [[u8]]): i32 {
  println("Hello from Galfus!")
  
  // Create an array and map over it
  const numbers = [1, 2, 3, 4, 5]
  const doubled = numbers.map(fn (n: i32): i32 => n * 2)
  
  return 0
}

JavaScript

utils.js
function debounce(func, wait) {
  let timeout;
  return function executedFunction(...args) {
    const later = () => {
      clearTimeout(timeout);
      func(...args);
    };
    clearTimeout(timeout);
    timeout = setTimeout(later, wait);
  };
}

HTML

template.html
<div class="card">
  <h2>Design System</h2>
  <p>Building consistent UI components.</p>
</div>