Compare commits

...

2 Commits

Author SHA1 Message Date
Akulij
79acdc283e use my fork of quickjs-rusty
Some checks are pending
Build && Deploy / cargo build (push) Waiting to run
2025-06-01 16:41:04 +05:00
Akulij
97e7886149 resture jsuser as argument 2025-06-01 16:40:41 +05:00
3 changed files with 4 additions and 6 deletions

6
Cargo.lock generated
View File

@ -1463,8 +1463,7 @@ dependencies = [
[[package]] [[package]]
name = "libquickjs-ng-sys" name = "libquickjs-ng-sys"
version = "0.9.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/akulij/quickjs-rusty.git#a7529d4a6523b28ca7402bbd8d0373010de6cdb7"
checksum = "3c98c1ad542ec61348faba7ce5386fef9060e35fbeea19dda64ce41862084e0a"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"cc", "cc",
@ -2009,8 +2008,7 @@ dependencies = [
[[package]] [[package]]
name = "quickjs-rusty" name = "quickjs-rusty"
version = "0.9.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/akulij/quickjs-rusty.git#a7529d4a6523b28ca7402bbd8d0373010de6cdb7"
checksum = "b3b4d659d1bc37e9112a14ad9a7727d182b0fb12216eb6684bdbada3e9991a22"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",

View File

@ -19,7 +19,7 @@ lazy_static = "1.5.0"
log = "0.4.27" log = "0.4.27"
mongodb = "3.2.3" mongodb = "3.2.3"
pretty_env_logger = "0.5.0" pretty_env_logger = "0.5.0"
quickjs-rusty = "0.9.0" quickjs-rusty = { git = "https://github.com/akulij/quickjs-rusty.git" }
serde = { version = "1.0.219", features = ["derive", "serde_derive"] } serde = { version = "1.0.219", features = ["derive", "serde_derive"] }
serde_json = "1.0.140" serde_json = "1.0.140"
teloxide = { version = "0.14.0", features = ["macros", "postgres-storage-nativetls"] } teloxide = { version = "0.14.0", features = ["macros", "postgres-storage-nativetls"] }

View File

@ -160,7 +160,7 @@ async fn handle_callback(bot: Bot, mut db: DB, bm: BotMessage, q: CallbackQuery)
handler, handler,
bm.literal() bm.literal()
); );
match handler.call_args(vec![]) { match handler.call_args(vec![jsuser]) {
Ok(v) => { Ok(v) => {
// let ctx = quickjs_rusty::Context::from(value) // let ctx = quickjs_rusty::Context::from(value)
println!("Ok branch, value: {:?}", v); println!("Ok branch, value: {:?}", v);