aboutsummaryrefslogtreecommitdiffstats
path: root/rust/TODO
blob: a90727c58d459ff8cda664e8c3d39048fd3cf6dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

from recent rust learning:
- entity_crud: don't need "generic" implementations, can have default implementaiton in the trait itself
- refactor all fatcatd code into `fatcat-server` directory (crate?)
- possibly a single fatcat-admin command (part of fatcat-server) instead of individual ones? also much better ergonomics for this command (eg, lookups by username)

correctness:
- changelog sequence without gaps

observability:
- remove sentry integration, we never use it and it is large/complex dependency
- improve logging, especially errors
    => query parameters for errors (but not auth tokens)
    => database timing?
    => any message for 400 errors

huge compile times:
- iron not small, but mostly reasonable deps
- does macaroon need both rustc-serialize and serde?
- sentry big but almost all "modern" hyper (0.12)
- slog has a lot of duplication (crossbeam)
- duplicated libs: 3 syn, 4 uuid, 3 crossbeam (etc), 2 hyper, 2 iron (wait,
  what?), 3x serde, 4x rand, 2x error-chain
    => rg '^name =' Cargo.lock  | uniq -cd | sort -n
- try: removing deps from fatcat-openapi
- uuid: could now switch to v0.7; needs code changes
- tweak crossbeam-channel version (used in fatcat-export)

refactor:
- consistent `conn` and `context` orders in _handler() functions

edit lifecycle
- per-edit extra JSON

- account helper tool: set admin bit

later:
- #![forbid(unsafe_code)]
- show deployed version:
    https://github.com/jkcclemens/paste/blob/942d1ede8abe80a594553197f2b03c1d6d70efd0/webserver/build.rs
    https://github.com/jkcclemens/paste/blob/942d1ede8abe80a594553197f2b03c1d6d70efd0/webserver/src/main.rs#L44
- "prev_rev" required in updates
- tried using sync::Once to wrap test database initialization (so it would only
  run migrations once), but it didn't seem to work, maybe I had a bug or it
  didn't compile?
    => could also do a global mutex: https://github.com/SergioBenitez/Rocket/issues/697
- could some of the EntityCrud trait macro stuff be re-implemented as an enum type?
- pure-rust "benchmark" scripts that hit, eg, lookups and batch endpoints
    => criterion.rs benchmarking
- try new hyper/openapi3 codegen branch
- refactor logging; simple env-logger-pretty
- test using hash indexes for some UUID column indexes, or at least sha1 and
  other hashes (abstracts, file lookups)