Skip to content

Custom replit eval server implementation that lets you use the replit.com IDE but with your own server as the backend

License

Notifications You must be signed in to change notification settings

Goval-Community/homeval

Repository files navigation


License: AGPL-3.0-only Services implemented: 12

Homeval is a custom server implementation of goval, replits evaluation protocol.

Caution

Homeval is still in early alpha and can be unstable so do not trust it with data you have not backed up.

License

Homeval is licensed under GNU AGPL-3.0-only

Restrictions on running homeval on replit

Unfortunately due to replit's TOS, AGPL programs cannot be run in public repls. Though, private repls are fine, as long as you still fulfill the terms of the license.
This is due to all public repls being licensed under MIT, and GPL code cannot be included in a MIT licensed project.

Building homeval

  1. Git clone the repository
  2. Install required dependencies

Running homeval

Required tools

Setup

Database

Set up a PostgreSQL database and set the env var $HOMEVAL_DB to its connection url.

If the database isn't setup repldb won't work, and file history won't persist through server restarts.

Proper Authentication

Warning

If you use someone else's key server it could let them authenticate as any user on your homeval instance

Note

This feature has not been tested with deployments yet, a new solution may be needed.

Run repl-key-server on a repl and set the env var $HOMEVAL_PASETO_KEY_URL to <your repl url>/keys.

Replspace api

Important

This will not work on windows see #112

To make use of this feature make sure that all files in extras/ are placed in a directory contained in your $PATH on the machine running homeval.

Building

Homeval can be built into a binary with cargo build --release the binary will then end up in target/release/homeval or target/release/homeval.exe (make sure to set RUST_LOG=INFO when running this binary or you won't get any logs).

Minimal Build

To build a minimal build run cargo build --release --no-default-features, this will compile out the following features:

  • replspace api
  • database support
  • repldb
  • connection authentication

It will however produce a smaller binary, and compile faster.

Running

To compile and run a debug build use cargo run.

Implementing a service

Make a new file in services/src/ name it with the format <service name>.rs then see existing services and services/src/traits.rs for the interface you need to provide. Docs focussed on implementing services are a WIP.

To then use the service you will need to edit services/src/lib.rs to include your service.

  1. Make a new line at the top of services/src/lib.rs and add mod <service name>
  2. Go to the definition of Channel::new and add your service initialization code to the match statement.
  3. Add your service to IMPLEMENTED_SERVICES (it can be found at the bottom of services/src/lib.rs)

Supported targets

Target Will Compile Officially Supported Feature Complete Tested1
Linux2 3
macOS4
Windows 5

Footnotes

  1. This marks if every release is officially tested for this target.

  2. The distro has to have an up to date GLIBC version, musl is not supported.

  3. Currently, the only tested distribution is arch linux. Though all distros with an up to date GLIC should work.

  4. Please not that PotentialStyx (the main dev) does not have any machines that run macOS, so issues on macOS might take longer to fix.

  5. While the windows binary supports every feature, the replspace binaries found in extras still need to be ported to batch/powershell (#112)

About

Custom replit eval server implementation that lets you use the replit.com IDE but with your own server as the backend

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •  

Languages