1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-27 01:48:17 +00:00
Commit Graph

13 Commits

Author SHA1 Message Date
matejcik
2aa427a6e3 feat(core/rust): make Rust buildable without Micropython
Features `micropython` and `protobuf` are defined. Protobuf implies micropython
because our protobuf impl is pretty much _for_ micropython.

The respective subdirs are included only if the matching feature is defined.

util.rs is moved to micropython because it mostly concerns micropython interop

ResultExt, useful only for ui_debug, is moved to ui::util.

A new module `trezorhal::time` is provided. It mirrors functionality of
`micropython::time` via stmlib functions.  The intended use is to always use
functions from `trezorhal::time`. The right micropython variants are used when
micropython is available, otherwise the pure stmlib versions are called.

ui::*::layout is conditional for micropython feature, because it only concerns
micropython layouts. If we want to reuse layouts defined there, we will need to
export them to not depend on Objs and Qstrs etc.
2022-06-16 13:08:07 +02:00
Jan Pochyla
3dd3d7f87b feat(core): Add HoldToConfirm example, improve Loader and animation frame support 2022-02-01 10:51:02 +01:00
Jan Pochyla
901580817d chore(core/rust): fixes and formatting
[no changelog]
2021-10-07 15:01:55 +02:00
Jan Pochyla
5eefcffc7c chore(core): prepare for fuzzing targets
First, we change the Protobuf definition includes to use an exact path relative to our crate's directory, instead of the OUT_DIR. This fixes build when a combination of stable and nightly toolchains is used (nightly is needed for the fuzzing targets).

Another change is a slight fix in the panic handler conditional compilation. Fuzzing is using the crate with `features = ["test"]`, but doesn't turn on the `test` cfg.

[no changelog]
2021-10-07 15:01:55 +02:00
Jan Pochyla
2703d714c2 feat(core): add Rust UI components, layouts, text rendering
[no changelog]
2021-10-07 15:01:55 +02:00
Martin Milata
81e66cb024 style(core/rust): enable clippy lints
[no changelog]
2021-09-23 14:22:40 +02:00
matejcik
5e452dc57c refactor(core/rust): propagate unsafety of raise_exception 2021-09-21 12:43:31 +02:00
matejcik
795ed2d339 fix(core/rust): fix "unnecessary unsafe" warning
[no changelog]
2021-09-21 12:43:31 +02:00
matejcik
31de21718f feat(core/rust): introduce Obj.is_null()
[no changelog]
2021-09-21 12:43:31 +02:00
matejcik
b666895303 feat(core/rust): catch, handle and propagate uPy exceptions 2021-09-21 12:43:31 +02:00
Martin Milata
a007e062ab style(core): apply rustfmt
[no changelog]
2021-09-16 14:57:06 +02:00
Martin Milata
582e1318c4 feat(core/emulator): support protobuf messages in memory dumps
[no changelog]
2021-07-22 13:31:11 +02:00
Jan Pochyla
8a21e3fc73 feat(core): Add Rust Protobuf codec 2021-06-08 09:55:19 +02:00