Start updating documentation
This commit is contained in:
parent
7b4751d544
commit
25e3bdf6d8
|
@ -27,7 +27,8 @@ Riju does not collect your personal information.
|
|||
* Riju uses [Fathom Analytics](https://usefathom.com/) to measure
|
||||
traffic. Fathom collects very limited data and does not sell it to
|
||||
third parties, unlike Google Analytics.
|
||||
* Riju does not serve advertisements.
|
||||
* Riju does not serve advertisements or share data with any third
|
||||
party aside from Fathom Analytics.
|
||||
|
||||
All of the above notwithstanding, any service that allows people to
|
||||
run code online is inherently risky. For this reason, I can't make any
|
||||
|
|
|
@ -8,4 +8,7 @@ way to:
|
|||
* View or interfere with another user's session.
|
||||
* Tamper with the Riju server.
|
||||
|
||||
I will do my best to correct the vulnerability as soon as possible.
|
||||
Although I work on Riju in my free time, I take security seriously, so
|
||||
I will do my best to get back to you in less than a week, and to
|
||||
correct the vulnerability as soon as possible (I will let you know the
|
||||
likely timeline by email).
|
||||
|
|
|
@ -24,8 +24,8 @@ start the admin shell:
|
|||
$ make image shell I=admin
|
||||
```
|
||||
|
||||
All future operations can be done inside the admin shell, where all
|
||||
dependencies are installed automatically.
|
||||
All future operations can be done inside the admin shell, where Riju's
|
||||
dependencies are already installed.
|
||||
|
||||
## Start tmux
|
||||
|
||||
|
@ -48,60 +48,32 @@ keybindings are:
|
|||
use `control-b` twice to do a command on the inner one instead of
|
||||
the outer one
|
||||
|
||||
## Configure local project
|
||||
## Start Riju server
|
||||
|
||||
Using your regular text editor (the Riju repository is synchronized
|
||||
inside and outside of the container, so you can use whatever editor
|
||||
you would like, it doesn't have to be something in the terminal),
|
||||
create a file `.env` in the Riju repository with the following
|
||||
contents:
|
||||
Use `dep`, the Riju build tool, to compile the Docker image that the
|
||||
Riju server will run inside:
|
||||
|
||||
```
|
||||
DOCKER_REPO=raxod502/riju
|
||||
S3_BUCKET=riju
|
||||
$ dep image:runtime
|
||||
```
|
||||
|
||||
This tells Riju to pull assets from the official registries that I
|
||||
maintain, so that you don't have to build them yourself.
|
||||
|
||||
## Set up Docker images
|
||||
|
||||
Download the two Docker images needed for testing a new language:
|
||||
Start Riju in development mode:
|
||||
|
||||
```
|
||||
$ make pull I=packaging
|
||||
$ make pull I=runtime
|
||||
```
|
||||
|
||||
Create a new tab in tmux (`control-b c`) and start the runtime image
|
||||
with ports exposed:
|
||||
|
||||
```
|
||||
$ make shell I=runtime E=1
|
||||
```
|
||||
|
||||
Inside that shell, start another instance of tmux:
|
||||
|
||||
```
|
||||
$ make tmux
|
||||
```
|
||||
|
||||
Now within that tmux, start Riju in development mode:
|
||||
|
||||
```
|
||||
$ make dev
|
||||
$ make shell I=runtime E=1 CMD="make dev"
|
||||
```
|
||||
|
||||
You should now be able to navigate to <http://localhost:6119> and see
|
||||
that Riju is running, although it does not have any languages
|
||||
installed.
|
||||
|
||||
Finally, switch back to the admin shell (`control-b p`). We are ready
|
||||
to start creating your new language.
|
||||
We are now ready to start creating your new language.
|
||||
|
||||
## Create a language configuration
|
||||
|
||||
Create a file `langs/mylanguage.yaml` with the following contents:
|
||||
Create a file `langs/mylanguage.yaml` with the following contents
|
||||
(replacing `mylanguage` and `My Language` with appropriate values,
|
||||
like `objectivecpp` and `Objective-C++`):
|
||||
|
||||
```yaml
|
||||
id: "mylanguage"
|
||||
|
@ -115,15 +87,21 @@ run: |
|
|||
echo "Hello, world!"
|
||||
```
|
||||
|
||||
Now from the admin shell, run `make repkgs L=mylanguage`. Once that
|
||||
completes, you should see your language at <http://localhost:6119>.
|
||||
Furthermore, you can switch to the runtime image (`control-b n`) and
|
||||
run `make sandbox L=mylanguage` to test your language at the command
|
||||
line (e.g. type `run` to print `Hello, world!`). Each time you modify
|
||||
the language configuration, run `make repkgs L=mylanguage` to
|
||||
reinstall the language.
|
||||
Open a new tmux pane in the admin shell (`control-b c`) and build the
|
||||
Docker image for your language:
|
||||
|
||||
Follow these steps to augment your language configuration:
|
||||
```
|
||||
$ dep image:lang-mylanguage
|
||||
```
|
||||
|
||||
Once that completes, you should see your language at
|
||||
<http://localhost:6119>. Furthermore, you can run `make sandbox
|
||||
L=mylanguage` to test your language at the command line (e.g. type
|
||||
`run` to print `Hello, world!`). Each time you modify the language
|
||||
configuration, run `dep image:lang-mylanguage` to update the language.
|
||||
|
||||
Follow these steps to get from "Hello, world" to running your actual
|
||||
language:
|
||||
|
||||
* [Install your language](tutorial/install.md)
|
||||
* [Provide run commands](tutorial/run.md)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Tutorial: install your language
|
||||
|
||||
Presumably, your language isn't installed by default in Ubuntu. If
|
||||
Most likely, your language isn't installed by default in Ubuntu. If
|
||||
not, you'll need to add an `install:` block to your language
|
||||
configuration describing how to install it.
|
||||
|
||||
|
@ -95,7 +95,8 @@ paths for the targets of symlinks (`/opt/swift/bin/swiftc`) but
|
|||
This is because while we are putting all files into `${pkg}` during
|
||||
build, the eventual place they will be installed by the package is
|
||||
into the root filesystem, so any references to paths *within* files
|
||||
(including symlink targets) must not mention `${pkg}`.
|
||||
(including symlink targets) must not mention `${pkg}`. This is a
|
||||
standard feature of all Linux packaging tools.
|
||||
|
||||
```yaml
|
||||
install:
|
||||
|
|
|
@ -62,9 +62,8 @@ Here are some explicit *non-requirements*:
|
|||
* *Language must be well-known.* Nope, I'll be happy to add your pet
|
||||
project; after all, [Kalyn](https://github.com/raxod502/kalyn) and
|
||||
[Ink](https://github.com/thesephist/ink) are already supported.
|
||||
* *Language must be useful.* I would have no objection to adding
|
||||
everything on the esolangs wiki, if there are interpreters/compilers
|
||||
available.
|
||||
* *Language must be useful.* I have no objection to adding everything
|
||||
on the esolangs wiki, if there are interpreters/compilers available.
|
||||
* *Language must be easy to install and run.* Well, it would be nice,
|
||||
but I've seen some s\*\*\* when adding languages to Riju so it will
|
||||
take a lot to surprise me at this point.
|
||||
|
|
|
@ -27,7 +27,7 @@ const jsonSchemaPromise = readJSONSchemaFromDisk();
|
|||
export async function getLangs() {
|
||||
return (await fs.readdir("langs"))
|
||||
.filter((lang) => lang.endsWith(".yaml"))
|
||||
.map((lang) => path.parse(lang).name);
|
||||
.map((lang) => path.parse(lang).name).sort();
|
||||
}
|
||||
|
||||
// Return a list of the IDs of all the configured shared dependencies.
|
||||
|
|
Loading…
Reference in New Issue