Source Code


.li is strongly reccommended. But it is not forced.


Cotowali script is executed from top to bottom. Cotowali don't have entorypoint but you can use a virtual entrypoint as follows.

fn main() {


Load files

You can use require to load other files. require differs from source command in it is resolved at compile-time.

fn add(a int, b int) int {
  return a + b

require './'
assert add(1, 1) == 2

Load remote files

require supports load files from http, https and github.

Use a raw url for http and https. Use a special url like require 'github:user/repo@ref/path' for github. ref cannot be omitted.

// https
require ''

// github
require 'github:cotowali/cotowali@main/examples/'


You can use require with checksums。If one or more checksums are specified, checksums of the target file is verified at compile-time.

Cotowali supports md5, sha1 antd sha256 as a checksum algorithm.

require 'github:cotowali/cotowali@main/tests/' {
  md5   : 'd41d8cd98f00b204e9800998ecf8427e',
  sha1  : 'da39a3ee5e6b4b0d3255bfef95601890afd80709',
  sha256: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',

Copyright © zakuro <>

Design by zakuro & Yuki Amane (Pianoforte)