[package]
name = "luatest"
version = "0.1.0"
edition = "2021"
#build = "build.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
hlua = "0.3"
main.rs
extern crate hlua;
use hlua::Lua;
fn main() {
let mut lua = Lua::new();
let x: u32 = lua.execute("return 6 * 2;").unwrap(); // equals 12
println!("ssss{}", x);
}
log
C:/Users/xm111/.cargo/bin/cargo.exe run --color=always --package luatest --bin luatest
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target\debug\luatest.exe`
error: process didn't exit successfully: `target\debug\luatest.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
Process finished with exit code -1073741819 (0xC0000005)
cargo.toml
main.rs
log
Why is that?