Skip to content

Commit d1f3f1c

Browse files
authored
Console poc (#36)
* PoC Console for logging. * Fix underconstrained type on `nx::sf::Buffer`. The buffer type previously didn't take into account the lifetime of the referenced data, so it is easy to cause use after free in API clients or accidentally hold on to buffer references too long in server implementations. This gives a lifetime bound to the buffer type so it (hopefully) doesn't outlive the source data or escape the server function. * WIP - streaming console output is nicer, but no vty support yet. * WIP2 * Interactive ANSI console MVP * fix warnings. * remove panic from raw frame writes. * Main no longer returns a Result that automatically panics. * Fix typo.
1 parent 82ce20c commit d1f3f1c

File tree

11 files changed

+946
-46
lines changed

11 files changed

+946
-46
lines changed

Cargo.toml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "nx"
3-
version = "0.2.2"
3+
version = "0.3.0"
44
authors = ["XorTroll", "Pantsman0"]
55
edition = "2024"
66
include = [
@@ -17,9 +17,19 @@ lock_api = { version = "0.4.12", features = ["nightly"] }
1717
atomic_enum = "0.3.0"
1818
zeroize = { version = "1.8.1", features = ["aarch64"] }
1919
nx-derive = { path = "nx-derive/" }
20-
num-traits = { version = "0.2.19", default-features = false, features = ["libm"]}
2120
bitfield-struct = "0.11.0"
2221
num-derive = "0.4.2"
22+
enum-iterator = "2.1.0"
23+
24+
25+
[dependencies.embedded-term]
26+
version = "0.1.1"
27+
optional = true
28+
default-features = false
29+
30+
[dependencies.embedded-graphics-core]
31+
version = "0.3.3"
32+
optional = true
2333

2434
[dependencies.line_drawing]
2535
optional = true
@@ -37,6 +47,11 @@ version = "0.3"
3747
default-features = false
3848
features = ["unicode"]
3949

50+
[dependencies.num-traits]
51+
version = "0.2.19"
52+
default-features = false
53+
features = ["libm"]
54+
4055
[dependencies.unwinding]
4156
version = "0.2.6"
4257
default-features = false
@@ -58,6 +73,8 @@ default = []
5873
services = []
5974
smc = []
6075
gpu = ["services"]
76+
vty = ["console", "dep:embedded-term", "dep:embedded-graphics-core"]
77+
console = ["canvas", "dep:font8x8"]
6178
canvas = ["gpu", "dep:line_drawing"]
6279
fonts = ["canvas", "dep:ab_glyph", "dep:font8x8"]
6380
truetype = ["fonts"]

0 commit comments

Comments
 (0)