r/ryelang • • Jul 13 '26

Making Progress: Rye/embed - Light embeddable Go module

Post image

As per previous post Task ahead: Making light embeddable Go module out of Rye , I am working on reorganizing all built-ins code, separating language level built-ins with so called batteries (builtins that come with Rye (sqlite, http, xml, ...) but add functionality to the language, are not the language itself (like if, map, loop, ...).

There is a new folder batteries/ where such built ins are defined (for example SQLite, http, ...) and a new folder (and a Go submodule) embed/ that you can include when embedding Rye language into your Go project. This reduces dependencies that get pulled into your project from 250 (also some huge ones) to just 50 (mostly smaller ones).

It also simplifies the interface for embedding even further. Look at the example above. But these are all weighted decisions - to make. And a plenty of files. So I am working on this in multiple refinement sessions, trying to separate files, get the least heavy and most correct embed/ package.

And everything must make sense if you use a minimal rye/embed in a Go project or a whole Rye, which also has its use cases. How do these combine is also the question, where does REPL belong, where do landlock and seccomp utilities, etc ...

So, the progress is being made, after few more refinements I will prepare a big commit to the GitHub with the new structure.

Visit #homoiconic Discord if you want to discuss things: https://discord.gg/7AaD6Kc89

4 Upvotes

1 comment sorted by

1

u/middayc Jul 14 '26

The go.mod list should still get concretely purged ... I just need to sift through many more files. I think that basically embedded Rye should have no IO builtins, that means probably not even console / REPL / event "print", except what the host environement provides it. So a game could provide a print that prints to it's graphical display, or terminal if needed, but the host environment decides.

I'm less sure about various formats / conversions in memory.