max-m / rust-libretro Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
When I try to run the test example (and any other), I get the following error:
[INFO] [Core]: Loading dynamic libretro core from: "../target/debug/examples/libtest.so"
[ERROR] Failed to open libretro core: "/home/memphis/ExternalCode/rust-libretro/target/debug/examples/libtest.so"
Error(s): /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/memphis/ExternalCode/rust-libretro/target/debug/examples/libtest.so)
It says glibc 2.33 is required, but I have glibc 2.36 installed so I'm not sure why it builds for 2.33
The commands I ran to get this were:
cargo build --example test --features="unstable-env-commands log"
retroarch -v -L ../target/debug/examples/libtest
from the rust-libretro/rust-libretro
directory
I'm on Ubuntu 22.10
The first line of output of ldd --version
is ldd (Ubuntu GLIBC 2.36-0ubuntu4) 2.36
Also is there a way for this to be at least moderately independent of glibc version?
I'm attempting to build a local copy of this repo, but I keep getting errors relating to the type size_t
being missing. It looks like it's not consistently being generated by bindgen; is there any reason not to use the type provided by libc
instead?
Because of how RetroLogger
is initialized, any logging output made with log!()
is forwarded to the RetroArch log. This is a good thing; however, some Rust crates are a bit excessive. They might use debug!()
when trace!()
would've been more appropriate. Or perhaps I'm just not interested in what they have to say. See this log file for an example. For the purpose of this ticket, the contents of the log file are unimportant; just note that there's a lot of repetitive input that I don't care about.
I'd like (and intend to contribute) the ability to configure overrides with RetroLogger
, such that scopes can be disabled or mapped to different log levels. Here's what I'm thinking:
RetroLogger
pub
licly so that it can be customized if the default behavior isn't desired (and so that existing usage is unchanged)RetroLogger
method that's used something like this:logger.set_overrides(HashMap::from([
("naga::*", Mute), // Ignore all output from the naga scope and it's sub-scopes
("wgpu_core::track::texture", Remap(log::Level::Debug, log::Level::Trace), // Force all debug output from wgpu_core::track::texture to be outputted as trace logs instead
("wgpu_core::device", Force(log::Level::Trace)), // Force all output from wgpu_core::device to be outputted as trace logs
("something_else", Remap(log::Level::Warn, log::Level::Error), // Force all warn output from something_else to be outputted as error logs
]))
This particular design is just a back-of-the-napkin idea. What do you think?
If I provide a log interface like this:
unsafe extern "C" fn log(level: retro_log_level, _fmt: *const c_char, ...) {
todo!()
}
I get the following warning:
warning improper_ctypes_definitions
`extern` fn uses type `rust_libretro_sys::retro_log_level`, which is not FFI-safe
this enum is non-exhaustive
`#[warn(improper_ctypes_definitions)]` on by default (lsp)
I'm assuming this is something related to the way bindgen is set up but not sure how to address just yet.
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.