You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yesterday i was trying to fix wasmerio/wasmer#3591 which depends on minifb, after implementing the missing async traits wasmer compiles and everything seems working on the terminal but there's no window
today i'm having a similar issue with rhai, here's what i've written so far:
main.rs
// logging#[macro_use]externcrate log;use fbtest::{
init_logger, timestamp,
create_window, update_window,
generate_frame, pixel::{Pixel,DARK_GREY,WHITE}};use rhai::{Engine,EvalAltResult,Locked,AST};use std::time::Duration;constWIDTH:usize = 600;constHEIGHT:usize = 600;fnmain(){init_logger();let fps = Duration::from_millis(1000/60);letmut window = create_window(WIDTH,HEIGHT, fps,"fbtest1").unwrap_or_else(|| unimplemented!());let rhai = Engine::new();let script = "40 + 2";debug!("rhai output: {}", rhai.eval::<i64>(script).unwrap());let ast = rhai.compile(format!("\ x -= (t % 1.0)*2.0-1.0;\ (x*x + y*y) < (sin(t*1.2)*0.5+0.5)*0.25\ ")).unwrap();let start_time = timestamp();while window.is_open(){let buffer = generate_frame::<{WIDTH},{HEIGHT}>(start_time, pixel,&rhai,&ast);update_window(&buffer,WIDTH,HEIGHT,&mut window);break;}loop{}}fnpixel(mutx:f64,y:f64,t:f64,rhai:&Engine,ast2:&AST) -> Pixel{letmut out = DARK_GREY;// commenting the following shows the window !?let ast1 = rhai.compile(format!("\ let x = {x};\ let y = {y};\ let t = {t};\ ")).unwrap();// let check = rhai.eval_ast::<bool>(&ast1.merge(ast2)).unwrap();// debug!("rhai debug: {check}");// if check {// out = WHITE;// }
x -= (t % 1.0)*2.0-1.0;if(x*x + y*y) < ((t*1.2).sin()*0.5+0.5)*0.25{
out = WHITE;}
out
}
Sigh, So many issues with Wayland :( but this is a new one. I will in the near future have a look at all the Wayland issues. I haven't implemented the Wayland support myself, but I think i will need to "take ownership" and fix the issues. I will put this on the list when I do.
If you have the possibility to test on another target and see if it behaves the same that would be much appreciated.
yesterday i was trying to fix wasmerio/wasmer#3591 which depends on minifb, after implementing the missing async traits wasmer compiles and everything seems working on the terminal but there's no window
today i'm having a similar issue with
rhai
, here's what i've written so far:main.rs
lib.rs
even using the macros from
log
crate results in the same issue, window is not visibleThe text was updated successfully, but these errors were encountered: