Rust Rewrite WIP
This commit is contained in:
parent
c9a87ddc34
commit
4569aeac33
60 changed files with 44263 additions and 7 deletions
1
rust/.gitignore
vendored
Normal file
1
rust/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/target
|
||||
4454
rust/Cargo.lock
generated
Normal file
4454
rust/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
14
rust/Cargo.toml
Normal file
14
rust/Cargo.toml
Normal 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
1
rust/src/api/mod.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
pub mod simple;
|
||||
10
rust/src/api/simple.rs
Normal file
10
rust/src/api/simple.rs
Normal 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
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
2
rust/src/lib.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
pub mod api;
|
||||
mod frb_generated;
|
||||
Loading…
Add table
Add a link
Reference in a new issue