Misc Go interop fixes
This commit is contained in:
@ -3,6 +3,7 @@ use std::rc::Rc;
|
||||
use error_iter::ErrorIter as _;
|
||||
use log::error;
|
||||
use pixels::{Pixels, SurfaceTexture};
|
||||
use player::HOSTED_DEVICE;
|
||||
use viperid::{Device, VResult, SCREEN_H, SCREEN_W};
|
||||
// https://github.com/parasyte/pixels/blob/main/examples/minimal-web/src/main.rs
|
||||
use winit::{dpi::LogicalSize, event::Event, event_loop::{ControlFlow, EventLoop}, window::WindowBuilder};
|
||||
@ -15,12 +16,11 @@ fn main() {
|
||||
|
||||
async fn run() {
|
||||
let wasm = include_bytes!("../../../example_project/build/game.wasm");
|
||||
let device = Device::new();
|
||||
let mut executor =
|
||||
player::Executor::new(device.share(), wasm)
|
||||
player::Executor::new(wasm)
|
||||
.expect("should have been able to create executor");
|
||||
|
||||
host(device, move || {
|
||||
host(HOSTED_DEVICE.with(|d| d.share()), move || {
|
||||
executor.update();
|
||||
executor.get_error()?;
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user