Rust Rewrite WIP

This commit is contained in:
Henry Hiles 2026-01-17 14:29:38 -05:00
commit 4569aeac33
No known key found for this signature in database
60 changed files with 44263 additions and 7 deletions

1
rust/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/target

4454
rust/Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

14
rust/Cargo.toml Normal file
View file

@ -0,0 +1,14 @@
[package]
name = "rust_lib_nexus"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib", "staticlib"]
[dependencies]
flutter_rust_bridge = "=2.11.1"
matrix-sdk = "0.16.0"
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }

1
rust/src/api/mod.rs Normal file
View file

@ -0,0 +1 @@
pub mod simple;

10
rust/src/api/simple.rs Normal file
View file

@ -0,0 +1,10 @@
#[flutter_rust_bridge::frb(sync)] // Synchronous mode for simplicity of the demo
pub fn greet(name: String) -> String {
format!("Hello, {name}!")
}
#[flutter_rust_bridge::frb(init)]
pub fn init_app() {
// Default utilities - feel free to customize
flutter_rust_bridge::setup_default_user_utils();
}

35875
rust/src/frb_generated.rs Normal file

File diff suppressed because it is too large Load diff

2
rust/src/lib.rs Normal file
View file

@ -0,0 +1,2 @@
pub mod api;
mod frb_generated;