Getting Started

Getting Started Tile

Hi! 👋
Welcome to the tile and tasm docs.
tile is the high level language that generates tasm code for tvm. And then tvm will execute the generated binary code comes from tasm.

Getting Started Tasm

Building Tile from source code

  • clone the repo
    ssh: git clone --depth=1 git@github.com:tile-lang/tile.git
    https: git clone --depth=1 https://github.com/tile-lang/tile.git
  • create a build folder
    mkdir build\
  • build
    make
    native-build.bat / native-build.sh

Building tasm from source code

  • clone the repo
    ssh: git clone --depth=1 git@github.com:tile-lang/tile-vm.git
    https: git clone --depth=1 https://github.com/tile-lang/tile-vm.git
  • create a build folder
    mkdir build
    cd build
  • run CMakeLists.txt
    cmake ..
    cmake --build .

That's it!

Run your first tasm code

add.tasm
push 5
push 8
add   ; cool huh?
  • tasm add.tasm this will generate the out.bin
  • tvm and this will be executing the .bin file

Run your first tile code

hello.tile
// need to implement our print function because we don't have a standart lib yet.
func print(str: string): void {
    tasm {
        "load 0",
        "puts"
    }
}
 
func main(argc: int): void {
    print("Hello, World!\n");
}
  • tile add.tasm this will generate the out.bin
  • tvm and this will be executing the .bin file