Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Is it possible at the moment to use hoot with something like Geiser in Emacs?  I can't seem to evaluate the `game.scm` file in emacs, there is trouble importing (hoot ffi) and (math), both complaining about missing (hoot features). 

scheme@(guile-user)> (import (hoot ffi))
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /gnu/store/s8v5axydz2mvl65grbnszpis53njp7vb-profile/share/guile/site/3.0/hoot/ffi.scm
;;; compiling /gnu/store/s8v5axydz2mvl65grbnszpis53njp7vb-profile/share/guile/site/3.0/hoot/cond-expand.scm
;;; WARNING: compilation of /gnu/store/s8v5axydz2mvl65grbnszpis53njp7vb-profile/share/guile/site/3.0/hoot/cond-expand.scm failed:
;;; no code for module (hoot features)
;;; WARNING: compilation of /gnu/store/s8v5axydz2mvl65grbnszpis53njp7vb-profile/share/guile/site/3.0/hoot/ffi.scm failed:
;;; no code for module (hoot features)
;;; compiling /gnu/store/s8v5axydz2mvl65grbnszpis53njp7vb-profile/share/guile/site/3.0/hoot/cond-expand.scm
;;; WARNING: compilation of /gnu/store/s8v5axydz2mvl65grbnszpis53njp7vb-profile/share/guile/site/3.0/hoot/cond-expand.scm failed:
;;; no code for module (hoot features)
While compiling expression: 
no code for module (hoot features)

I am running through direnv+guix shell, and the correct guile (3.0.9-0.3b76a30) is being used.   I am able to both compile the wasm through the Makefile as well as run the dev server.

That's not possible, currently. Hoot is a cross-compiler, so what you're trying to do in your snippet is kind of like running an ARM executable on x86 without a virtual machine. Everything in the (hoot ...) namespace is only usable when compiling to wasm. For example, (hoot ffi) is for calling functions on a wasm host, not native Guile. Likewise, Guile's (system foreign) provides a C FFI and couldn't be used with Hoot. The Guile VM is the host environment that runs the compiler, and the browser is the target that runs the compiled wasm. In the future, we'd like to host the Hoot compiler in wasm, so that you could do the interactive development we're all used to doing with Geiser, but that's a ways off. Hope this helps!

Definitely helps! ty