Rust Nightly
````````````
-This is needed almost solely because Rocket needs it. Rocket is
-the web framework I am using. The next version of Rocket (0.5.x),
-which is in development, will not need Nightly, but it will also be
-a serious compatibility break. The existing Rocket (0.4.x) will
-almost certainly never be ported to Stable Rust. When Rocket 0.5.x
-is out, porting Otter to it will go on my list - but it won't be
-trivial. Sorry.
+This was needed almost solely because Rocket needs it.
+Hopefully we will compile on stable shortly.
The many dependencies of Otter
``````````````````````````````
-These are partly because Rocket is a large piece of software with
+These are partly because actix is a large piece of software with
much functionality. But also because I favoured my own programming
convenience and in some cases was experimenting with different
-approaches. In practice, it seems to me that once I'm using Rocket
+approaches. In practice, it seems to me that once I'm using Actix
and WASM and resvg and so on, there is not that much to be gained
by trying to prune the dependencies of the otter package itself.
The Otter server. This is a simple binary crate. Much
functionality belonging primarily, or only, to the server is in
`src/`, simply because it was easier not to disentangle it.
- Anything that needs Rocket (the web framework) is in `daemon/`.
+ Anything that needs Actix (the web framework) is in `daemon/`.
+ Generally, we try to keep async confined to there too.
* `base/`
"Non-web templates". Tera templates for things other than web
pages. Currently this includes the server's outgoing emails. These
- have to be in a separate directory because Tera (invoked by Rocket)
- likes to load everything applicable it finds in its own `templates/`
- directory. These are used via `src/nwtemplates.rs`.
+ are in a separate directory to distinguish them from the templates
+ for the actix webserver's Tera instance, which loads everything
+ in `templates/*.tera`.
* `apitest/`
Here is a copy of the config file from chiark. As you can see I am
running Otter as an "application server". My usual Apache
-configuration handles the TLS. (Rocket's TLS is not advertised as
-being suitable for production use.)
+configuration handles the TLS.
```
http_port = 1323
The `*.sse` wildcard domain is to work around a bug in the web
facility "server-sent events". You will probably want one of those
too. The SSE bug is documented on MDN
-<https://developer.mozilla.org/en-US/docs/Web/API/EventSource>
-(as referenced by the docs for `rocket::response::Stream::chunked`
-which is the underlying facility used by Otter).
+<https://developer.mozilla.org/en-US/docs/Web/API/EventSource>.
Final weirdness