ldesgoui / discord_game_sdk

Rust bindings for the Discord Game SDK
https://docs.rs/discord_game_sdk
Apache License 2.0
62 stars 11 forks source link

Can `-> Result<String>` methods be rewritten to not copy+allocate #26

Closed ldesgoui closed 5 years ago

ldesgoui commented 5 years ago

Currently, buffer is allocated on the stack and copied to a String once over (alloc + Copy)

Can we just use C/String to allocate to heap and pass that as a result instead