yancouto / rlua-builders Goto Github PK
View Code? Open in Web Editor NEWHelpers to generate lua functions that return rust objects using rlua.
License: MIT License
Helpers to generate lua functions that return rust objects using rlua.
License: MIT License
When attempting to build a trivial project based on coping and pasting the example from the documentation, cargo check
fails with:
Checking rlua-build v0.1.0 (/rlua-build)
error[E0277]: the trait bound `Person: rlua::userdata::UserData` is not satisfied
--> src/main.rs:3:10
|
3 | #[derive(LuaBuilder, UserData, Clone, PartialEq, Debug)]
| ^^^^^^^^^^ the trait `rlua::userdata::UserData` is not implemented for `Person`
|
note: required by a bound in `LuaBuilder`
--> /rlua-build/.cargo/registry/src/github.com-1ecc6299db9ec823/rlua-builders-0.1.4/src/lib.rs:95:41
|
95 | pub trait LuaBuilder<'s, T: ToLua<'s>>: UserData + Clone {
| ^^^^^^^^ required by this bound in `LuaBuilder`
= note: this error originates in the derive macro `LuaBuilder` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `LuaFunction<'s>: rlua::userdata::UserData` is not satisfied
--> src/main.rs:3:10
|
3 | #[derive(LuaBuilder, UserData, Clone, PartialEq, Debug)]
| ^^^^^^^^^^ the trait `rlua::userdata::UserData` is not implemented for `LuaFunction<'s>`
|
= note: required because of the requirements on the impl of `rlua::value::ToLua<'s>` for `LuaFunction<'s>`
note: required by a bound in `LuaBuilder`
--> /rlua-build/.cargo/registry/src/github.com-1ecc6299db9ec823/rlua-builders-0.1.4/src/lib.rs:95:29
|
95 | pub trait LuaBuilder<'s, T: ToLua<'s>>: UserData + Clone {
| ^^^^^^^^^ required by this bound in `LuaBuilder`
= note: this error originates in the derive macro `LuaBuilder` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: `*mut rlua_lua54_sys::bindings::lua_State` cannot be sent between threads safely
--> src/main.rs:3:10
|
3 | #[derive(LuaBuilder, UserData, Clone, PartialEq, Debug)]
| ^^^^^^^^^^ `*mut rlua_lua54_sys::bindings::lua_State` cannot be sent between threads safely
|
= help: within `LuaFunction<'s>`, the trait `Send` is not implemented for `*mut rlua_lua54_sys::bindings::lua_State`
= note: required because it appears within the type `LuaContext<'s>`
= note: required because it appears within the type `rlua::types::LuaRef<'s>`
= note: required because it appears within the type `LuaFunction<'s>`
= note: required because of the requirements on the impl of `rlua::value::ToLua<'s>` for `LuaFunction<'s>`
note: required by a bound in `LuaBuilder`
--> /rlua-build/.cargo/registry/src/github.com-1ecc6299db9ec823/rlua-builders-0.1.4/src/lib.rs:95:29
|
95 | pub trait LuaBuilder<'s, T: ToLua<'s>>: UserData + Clone {
| ^^^^^^^^^ required by this bound in `LuaBuilder`
= note: this error originates in the derive macro `LuaBuilder` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: `*mut PhantomData<UnsafeCell<()>>` cannot be sent between threads safely
--> src/main.rs:3:10
|
3 | #[derive(LuaBuilder, UserData, Clone, PartialEq, Debug)]
| ^^^^^^^^^^ `*mut PhantomData<UnsafeCell<()>>` cannot be sent between threads safely
|
= help: within `LuaFunction<'s>`, the trait `Send` is not implemented for `*mut PhantomData<UnsafeCell<()>>`
= note: required because it appears within the type `PhantomData<*mut PhantomData<UnsafeCell<()>>>`
= note: required because it appears within the type `LuaContext<'s>`
= note: required because it appears within the type `rlua::types::LuaRef<'s>`
= note: required because it appears within the type `LuaFunction<'s>`
= note: required because of the requirements on the impl of `rlua::value::ToLua<'s>` for `LuaFunction<'s>`
note: required by a bound in `LuaBuilder`
--> /rlua-build/.cargo/registry/src/github.com-1ecc6299db9ec823/rlua-builders-0.1.4/src/lib.rs:95:29
|
95 | pub trait LuaBuilder<'s, T: ToLua<'s>>: UserData + Clone {
| ^^^^^^^^^ required by this bound in `LuaBuilder`
= note: this error originates in the derive macro `LuaBuilder` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
error: could not compile `rlua-build` due to 4 previous errors
Using rlua 0.17.0 or 0.17.1 seems to make the build succeed. Newer, as well as older, rlua versions fail. I have not made any attempts at understanding the cause of the error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.