mlua-rs / mlua

High level Lua 5.4/5.3/5.2/5.1 (including LuaJIT) and Roblox Luau bindings to Rust with async/await support
Other
1.75k stars 139 forks source link

Add support for types in `std::num`. #438

Open mintlu8 opened 3 months ago

mintlu8 commented 3 months ago

This includes Wrapping<T>, Saturating<T>, NonZero<T>, NonZero* etc. I think parsing to and from numbers in FromLua and IntoLua without retaining these types' special property should be valid for most use cases, since it's crossing language boundaries.

cheesycod commented 3 weeks ago

@mintlu8 is this not possible already with mlua's serde ext