Blazingly fast Entity-Component-System microframework.

Upstream URL


Andrew Kravchuk <>




NOTE: this software is of alpha quiality, and the API is subject to change.

cl-fast-ecs is a Common Lisp library providing an implementation of the Entity-Component-System pattern, primarily focused on speed and interactive development.

ECS is an architectural data-oriented design pattern that allows for the effective processing of a large number of in-game objects while keeping the code and data separated. This provides flexibility in the way that game objects are built at runtime.

See the documentation page for more details.


  • Ability to interactively redefine components and systems on the fly.
  • Ability to interactively add new components and systems on the fly.
  • Native Lisp, no C/C++ code.
  • Mininal external dependencies (alexandria and trivial-garbage).


Just execute the following in your Lisp (assuming you have Quicklisp installed):
  (ql:quickload :cl-fast-ecs)

There's also a package for Guix package manager, you can use the following shell command to install it:

  guix install cl-fast-ecs

Currently tested to work on following Lisp compilers:


  (ql:quickload :cl-fast-ecs)
  (use-package :cl-fast-ecs)

  (defcomponent position
    "Location information"
    (x 0.0 :type single-float :documentation "X coordinate")
    (y 0.0 :type single-float :documentation "Y coordinate"))

  (defcomponent velocity
    (x 0.0 :type single-float)
    (y 0.0 :type single-float))

  (defsystem move
    (:components-ro (velocity)
     :components-rw (position))
    "Moves objects according to their velocity."
    (incf position-x velocity-x)
    (incf position-y velocity-y))

  (defsystem print
    (:components-ro (position))
    (format t "entity ~a: (~a, ~a)~%" entity position-x position-y))


  (let ((entity0 (make-entity)))
    (make-position entity0 :x 0.0 :y 0.0)
    (make-velocity entity0 :x 0.5 :y 0.5)
    (make-object '((:position :x 1.0 :y 1.0)
                   (:velocity :x 0.1 :y 0.1)))
    (dotimes (i 3)

1.4Related projects

  • beast is a thin layer of sugar over CLOS.
  • cl-ecs offers defcomponent / defsys macros, similar to the ones found in this project, and uses hash tables for component storage.
  • lisp butts game engine (sic) rolls its own CLOS-based ECS implementation.


Merge requests are welcome, just please submit them against the develop branch. For major changes, please open an issue first to discuss what you would like to change.


Copyright (C) 2023 Andrew Kravchuk (



Dependencies (4)

  • alexandria
  • cl-mock
  • parachute
  • trivial-garbage

Dependents (0)

    • GitHub
    • Quicklisp