惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
博客园_首页
雷峰网
雷峰网
V
V2EX
博客园 - 司徒正美
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - Franky
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
T
Tailwind CSS Blog
小众软件
小众软件
博客园 - 叶小钗
美团技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
MyScale Blog
MyScale Blog
Blog — PlanetScale
Blog — PlanetScale
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

The Rust Programming Language Forum - Latest topics

C++ to Rust -- Exceptions Re-exporting a trait with a custom derive_macro Gold linker is deprecated Why is using PhantomData valid in this case? Code review for Static Pool Allocator Looking for a pool based allocator Why is this legal? What does it mean for Rustc to run "out of TLS keys"? Using async/await internally with no internal runtime, but exposing a nonblocking poll API — is this a reasonable design? Testing functions that use randomness `cargo-path`: improve coding agents&#39; ability to find Rust documentation Rust task runners Lifetime weird case Windows - USB device not detected A random rustc-ice-[...].txt file appeared Develop rust where the environment is setup in a docker Undefined Behavior: in-bounds pointer arithmetic failed: attempting to offset pointer by 20 bytes, but got alloc238 which is only 1 byte from the end of the allocation Unbug 0.5 - Runtime debug assertions Is there a tiny error in section 6.2 Reference types? Lifetime woes implementing ratatui::Widget for a reference Rusqlite + Chrono: How do I simplify code to obtain chrono datetime value From OOP to Rust – struggling with code organization and data structure design Way to avoid a self-referential struct Rust RF and audio resources/communities Whyhttp - HTTP mocks that fail where the bug actually is Using tokio channel permits in a tower service Arc::increment_strong_count design question (cross-post) `&T`, `&mut T`, `Pin<&mut T>` and `&Cell<T>`: Ways of Borrowing a `T` Ratatui detect arrow key press and release Feedback about post in medium
Rmquickjs - High-level MicroQuickJS bindings for Rust
@nuskey8 · 2026-04-25 · via The Rust Programming Language Forum - Latest topics
I have released rmquickjs , a crate that provides high-level Rust bindings for MicroQuickJS . This includes a high-level Rust API that wraps MicroQuickJS's C API, as well as the ability to call functions from both JS and Rust. This crate is also available in no_std. use rmquickjs::*; fn main() -> Result<()> { // Initialize the MicroQuickJS engine let ctx = Context::new(); // Execute JS with eval() let result = ctx.eval("1 + 2")?; assert_eq!(result.to_i32(&ctx), Some(3)); // Access global variables with globals() ctx.eval("var x = 'hello'")?; let x = ctx.globals().get("x")?; assert_eq!(x.to_string(&ctx), "hello".to_string()); // Call JS functions from Rust ctx.eval( r#" function add(x, y) { return x + y; }"#, )?; let add = ctx.globals().get("add")?.to_function(&ctx).unwrap(); let result = add.call(&[ctx.new_i32(1), ctx.new_i32(2)])?; assert_eq!(result.to_i32(&ctx), Some(3)); // Call Rust functions from JS let sub = ctx.new_function(|ctx, this, args| { if args.len() != 2 { ctx.throw(ctx.new_string("invalid number of arguments"))?; } let a = args[0].to_i32(ctx).unwrap(); let b = args[1].to_i32(ctx).unwrap(); Ok(ctx.new_i32(a - b)) })?; ctx.globals().set("sub", sub); let result = ctx.eval("sub(1, 2)"); assert_eq!(result.to_i32(&ctx), Some(-1)); Ok(()) } Have fun! repo: GitHub - nuskey8/rmquickjs: High-level MicroQuickJS bindings for Rust · GitHub crates.io : crates.io: Rust Package Registry