Commit graph

58 commits

Author SHA1 Message Date
Damien Elmes
f9d5eda3f8 update Rust deps 2021-05-07 18:22:27 +10:00
Damien Elmes
deabb30dea report pinned package issues upstream 2021-04-27 23:11:22 +10:00
Damien Elmes
d76ef9cde5 update Rust deps
- tokio 1.0
- updated reqwest, thanks to Rumo
- other minor dep updates

the reqwest build file has been split into two, as it was awkward
to manually update the combined file, and the platform gate is now
on the target in rslib/
2021-04-27 22:18:12 +10:00
Damien Elmes
2a43d42323 run black/isort on Python scripts 2021-04-14 18:22:02 +10:00
Damien Elmes
926fc2e492 add missing copyright headers to *.py 2021-04-13 18:45:35 +10:00
Damien Elmes
2392c9b2b5 drop dependency on failure crate 2021-04-01 17:21:13 +10:00
Damien Elmes
2338998304 update to the latest rules_rust + security framework update 2021-03-27 19:28:19 +10:00
Damien Elmes
268dc8d389 update cargo/README.md
closes #1096
2021-03-27 14:56:51 +10:00
Damien Elmes
0a4bcd3faa update Rust deps 2021-03-27 14:47:16 +10:00
Damien Elmes
66d84336d7 update to latest Fluent 2021-03-27 13:24:11 +10:00
Damien Elmes
0c63a7c8c4 rework translation handling
Instead of generating a fluent.proto file with a giant enum, create
a .json file representing the translations that downstream consumers
can use for code generation.

This enables the generation of a separate method for each translation,
with a docstring that shows the actual text, and any required arguments
listed in the function signature.

The codebase is still using the old enum for now; updating it will need
to come in future commits, and the old enum will need to be kept
around, as add-ons are referencing it.

Other changes:

- move translation code into a separate crate
- store the translations on a per-file/module basis, which will allow
us to avoid sending 1000+ strings on each JS page load in the future
- drop the undocumented support for external .ftl files, that we weren't
using
- duplicate strings in translation files are now checked for at build
time
- fix i18n test failing when run outside Bazel
- drop slog dependency in i18n module
2021-03-26 09:41:32 +10:00
Damien Elmes
77e5d02cbc add note about bumping Rust deps 2021-03-15 13:29:36 +10:00
Arthur Milchior
e0dee90905 update is executable
Without this change, I can't just do `./update.py` and need to do `python3 update.py`
2021-03-13 07:35:36 +01:00
Damien Elmes
a5c2766a71 roll back slog-term due to Windows breakage 2021-03-10 12:22:11 +10:00
Damien Elmes
79e6de24ae add strum crate 2021-03-10 11:53:27 +10:00
Damien Elmes
f8e023d56b update Rust deps 2021-03-10 11:53:27 +10:00
Damien Elmes
2edd992020 render deck description with markdown; strip images
To support images on that screen, we'll first need to adjust the base url
for each platform, or rewrite the local image URLs, as otherwise they
are resolved to _anki/pages/...
2021-02-06 15:02:40 +10:00
Damien Elmes
3cae1b4cac sanitize deck description in decks screen on backend
Looks like ammonia only adds about 800k to the release binary
2021-02-06 13:42:38 +10:00
Damien Elmes
b87fc8e0fc pin proc_macro_nested due to Windows breakage 2021-02-03 21:17:11 +10:00
Damien Elmes
192c9a5418 update Rust deps 2021-02-03 20:29:48 +10:00
Damien Elmes
43e05aff6c update Rust deps; add async_trait 2021-01-11 19:19:45 +10:00
Damien Elmes
8b0588916e add aarch64-linux to BUILD.request.bazel 2020-12-30 20:39:27 +10:00
Damien Elmes
26c13f6dba add aarch64 Linux to cargo; update deps 2020-12-30 13:33:16 +10:00
Damien Elmes
2074bb03b6 update prost to new 0.7 release+auto stage changes
Allows us to drop slow git repo.
2020-12-28 10:12:35 +10:00
Damien Elmes
d222686755 update to stable pyo3 0.13 release 2020-12-23 10:08:38 +10:00
Damien Elmes
c17471f905 update Rust deps 2020-12-23 10:06:35 +10:00
Damien Elmes
4909a08c88 update to cargo-raze 0.8.0 release 2020-12-18 11:56:56 +10:00
Damien Elmes
cdea17e4f8 update Rust deps 2020-12-18 11:56:28 +10:00
Damien Elmes
4404324ac0 update to latest cargo-raze 2020-12-15 20:28:10 +10:00
Damien Elmes
7ebedb26c9 Merge pull request #848 from cecini/rslibdep
Update Rust deps, and nom to v6
2020-12-15 20:04:02 +10:00
cecini
77a94c8a45 Update rslib dep nom 2020-12-15 08:19:52 +00:00
cecini
f8a4b2ea84 fix update.py for compatible 2020-12-15 08:09:11 +00:00
Damien Elmes
cf8cfcf97f drop unused i686 references
https://forums.ankiweb.net/t/changing-ankis-build-system-to-bazel/4737/9
2020-12-09 15:45:01 +10:00
Damien Elmes
15f697aa30 bump rust deps 2020-12-09 15:34:43 +10:00
Damien Elmes
2bd73019df use compile_data with cargo raze
requires https://github.com/ankitects/cargo-raze/releases/tag/anki-2020-12-01
2020-12-01 16:48:45 +10:00
Damien Elmes
82c69ac260 make pyo/ring data arguments more specific 2020-12-01 16:48:45 +10:00
Damien Elmes
1315d8b3c1 update Rust deps incl. Pyo3
This includes the refcount bug fix from pyo3 0.12.4
2020-12-01 16:48:45 +10:00
Damien Elmes
2f9ddadf2c switch to workspace for Rust code 2020-11-24 18:41:03 +10:00
Damien Elmes
ed82c04b4e update rust deps 2020-11-24 16:57:37 +10:00
Damien Elmes
05725ab560 use ring on Linux; native-tls on other platforms
Python wheels on Linux require statically linked SSL libraries.
We were previously relying on the native-tls-vendored feature in
reqwest, but that does not work with Bazel, as openssl-src makes
assumptions that break when sandboxed. The static libs distributed
by distros like Ubuntu fail to link, and while we could potentially
build OpenSSL ourselves, we'd then need to keep it up to
date.

On Windows and Mac however, native-tls is preferable to ring, as it
allows us to get free updates from the OS, and results in
a smaller library.

Rust currently only supports platform-specific features in nightly,
and cargo-raze does not have support for them, so we currently need
to override the generated build file with a hand-crafted one that
specifies the relative features/deps for each platform.

update.py has been updated to automatically keep the version numbers
in this file up to date, so it should hopefully not prove too hard to
maintain going forward.
2020-11-15 15:25:28 +10:00
Damien Elmes
fd4c1edc7f add native-tls in preparation for Linux-only ring 2020-11-15 14:02:53 +10:00
Damien Elmes
702c4b29f9 update Rust deps 2020-11-15 13:31:24 +10:00
Damien Elmes
f83f0f08e2 drop El Capitan support 2020-11-12 20:03:41 +10:00
Damien Elmes
35fed9f0bd dump crate licenses as part of update run 2020-11-12 20:03:41 +10:00
Damien Elmes
588f677f7e rs dep updates 2020-11-12 20:03:41 +10:00
Damien Elmes
c4fcba6ade update to cargo-raze 0.7.0 + latest deps
Gives us wildcard entries in raze.toml, and solves warnings about
unrecognized "raze" entries.
2020-11-10 09:48:42 +10:00
Damien Elmes
f0e3d29979 switch to the stable Python ABI
Should allow the library to be imported in both Python 3.8+3.9.
2020-11-03 20:29:07 +10:00
Damien Elmes
f24d80bac5 update to latest fluent libs, and integrate maximum digit handling
We now limit number of digits in our formatter, instead of relying
on an upstream patch.
2020-11-03 14:10:45 +10:00
Damien Elmes
a001029961 add shallow_since to a bunch of git deps 2020-11-03 11:42:11 +10:00
Damien Elmes
6cde50e475 ues native roots with rustls 2020-11-03 10:42:20 +10:00