Tiny ECS as Defold Library

Hi! I’ve just packaged Tiny ECS as a Defold Library: https://github.com/ivanquirino/defold-tiny-ecs

To use it, add https://github.com/ivanquirino/defold-tiny-ecs/archive/refs/tags/1.3-3.zip as a dependency in your project. Then just require it like this:

local tiny = require("tinyecs.tiny")
6 Likes

There is Lua annotations for tiny-ecs here, if you are interested:

4 Likes

That is great, thank you! How can I put those annotations on the library and load them whenever the “tinyecs.tiny” file is loaded?

1 Like

Well, it is interested question how to make the library annotations are comfortable for everyone. I’m still not found which way is the best, there are several ways to do it.

Annotations are required to find type checking errors in the code faster and better code navigation

I’m using annotations in:

  • Defold Editor
  • Defold Kit (VS Code)
  • Any IDE + Lua Language Server (LLS)
  • I don’t use annotations

0 voters

The fully source annotated files is the best way for the Defold Kit or Defold Editor with new LLS. The Defold Kit can unpack the dependencies to make work “Go To Definition” function to the library code.

But for IDE with Lua Language Server there are two ways: copy source code or copy just “API Reference” like this annotations. So this kind of file I expected to see at /annotations/tinyecs/tiny.lua here.

1 Like

I would use your annotations and make a pull request to the original repo, but it has PRs sitting there for 2 years already. I think I will add it just to my repo instead.