When we want to back up a new engineering, we're faced with the question: "Do we (the Replit squad) build this adequacy into the Replit directly, or tin our users add together it themselves?". Usually, nosotros want the respond to be the latter. Repls are like personal computers for your projects. And the more than these personal computers can exist customized, the more they'll be used in artistic, unexpected ways.

Internally, we refer to the extent to which a Repl can be configured every bit "Repl Space". Then when we talk well-nigh building new features, we ever ask "can information technology be done in Repl Space?", which is basically asking if we tin can build it on Replit. Over the by year, Repl Infinite has become significantly more powerful, and soon, Replit volition be one of the most flexible computing platforms on the planet without compromising its simplicity. Now that we have the technical foundations in place, we're excited to bring more of that ability into the production in the class of Templates and some new configuration options.

Templates

templates screenshot

Where tin can I find templates?

Whenever you create a Repl, you'll be able to search through our list of Templates and start coding immediately. We also congenital a new templates gallery that lets you search and browse official and community templates. Publishing community templates is currently limited, but hither'due south a preview of what it looks like to add a Zig template, for case:

Add together a Zig template in Repl Infinite

Eventually we'll expand the ability to publish templates to more customs members. If you lot're interested in publishing a template, you can sign upward hither.

How do I configure a template?

A repl is configured using 2 files:

  • replit.zip: This file specifies the Nothing packages to install into the repl. For example: compilers, language servers, debuggers, cli tools.
  • .replit: This file specifies how the repl operates. For example: The command to execute when the run push is pressed or which LSP server to run for a given language.

Below is an case of a replit.nix file that installs Zig, Zig Language Server, and gdb. The environment is automatically cached by default to ensure fast repl startup fourth dimension.

          { pkgs }: {            deps            = [ pkgs.zig pkgs.zls pkgs.gdb ]; }        

And here is an example of configuring .replit to customize the run control, which is executed when you press the run button.

                      # this will run the principal zig file inside of your Repl.            run            = ["zig",            "run",            "src/principal.zig"]        

For more in-depth data about Goose egg and .replit, check out our docs.

The hereafter

Nosotros're working on making Repl Infinite even more powerful. Ideally, we're headed towards beingness able to make, share, and collaborate on all kinds of customized computing environments– not but for writing code, but for gaming, cartoon, and more.

If you're interested in being a Community Template developer, please fill out the application class here!