Rust/Javascript interop demo with miniquad

Overview

Rust/Javascript interop demo with miniquad

Build instructions:

rustup target add wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown
cp target/wasm32-unknown-unknown/debug/miniquad-js-interop-demo.wasm js/demo.wasm
cd js
cargo install basic-http-server # optional, any http server will works
basic-http-server . # or any other http server to server static files with wasm MIME
You might also like...
Rust library to create a Good Game Easily

ggez What is this? ggez is a Rust library to create a Good Game Easily. The current version is 0.6.0-rc0. This is a RELEASE CANDIDATE version, which m

RTS game/engine in Rust and WebGPU
RTS game/engine in Rust and WebGPU

What is this? A real time strategy game/engine written with Rust and WebGPU. Eventually it will be able to run in a web browser thanks to WebGPU. This

unrust - A pure rust based (webgl 2.0 / native) game engine

unrust A pure rust based (webgl 2.0 / native) game engine Current Version : 0.1.1 This project is under heavily development, all api are very unstable

Rust bindings for GDNative

GDNative bindings for Rust Rust bindings to the Godot game engine. Website | User Guide | API Documentation Stability The bindings cover most of the e

SDL bindings for Rust

Rust-SDL Bindings for SDL in Rust Overview Rust-SDL is a library for talking to SDL from Rust. Low-level C components are wrapped in Rust code to make

SDL2 bindings for Rust

Rust-SDL2 Bindings for SDL2 in Rust Changelog for 0.34.2 Overview Rust-SDL2 is a library for talking to the new SDL2.0 libraries from Rust. Low-level

SFML bindings for Rust

rust-sfml Rust bindings for SFML, the Simple and Fast Multimedia Library. Requirements Linux, Windows, or OS X Rust 1.42 or later SFML 2.5 CSFML 2.5 D

Rust bindings for libtcod 1.6.3 (the Doryen library/roguelike toolkit)

Warning: Not Maintained This project is no longer actively developed or maintained. Please accept our apologies. Open pull requests may still get merg

Victorem - easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust.

Victorem Easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust. Example Cargo.toml [dependencies] vict

Comments
  • wasm failed to load. Incompatable gl.js version

    wasm failed to load. Incompatable gl.js version

    Screenshot from 2022-12-22 01-09-49

    <body>
        <canvas id="glcanvas" tabindex='1'></canvas>
        <!-- Minified and statically hosted version of https://github.com/not-fl3/macroquad/blob/master/js/mq_js_bundle.js -->
        <script src="https://not-fl3.github.io/miniquad-samples/mq_js_bundle.js"></script>
        <script>load("snake.wasm");</script> <!-- Your compiled wasm file -->
    </body>
    

    macroquad version "0.3.25"

    opened by ZacharyGillmore 1
  • match function rename in sapp-jsutils

    match function rename in sapp-jsutils

    Thanks for making macroquad!

    I ran into an error while looking up how to do js interop. It looks like 'from_js_object' was renamed 'consume_js_object' (which makes sense).

    opened by Giesch 1
Owner
Fedor Logachev
Fedor Logachev
An alternative ggez implementation on top of miniquad.

Good Web Game good-web-game is a wasm32-unknown-unknown implementation of a ggez subset on top of miniquad. Originally built to run Zemeroth on the we

null 294 Jan 2, 2023
A mini-game demo of BonsaiDb + Gooey

"Minority Game" Demo Why build this? This repository originally was created for a presentation at the December Rust Gamedev Meetup. @ecton recorded th

Khonsu Labs 2 Jan 2, 2022
🌎 Demo for Minecraft-like procedural generation using the Bevy game engine

infinigen This is a demo for Minecraft-like procedural generation using the Bevy game engine. chunks along all axes (X, Y and Z) adjustable zoom level

James Hiew 16 Jun 11, 2023
Rust-raytracer - 🔭 A simple ray tracer in Rust 🦀

rust-raytracer An implementation of a very simple raytracer based on Ray Tracing in One Weekend by Peter Shirley in Rust. I used this project to learn

David Singleton 159 Nov 28, 2022
Rust-and-opengl-lessons - Collection of example code for learning OpenGL in Rust

rust-and-opengl-lessons Project requires Rust 1.31 Collection of example code for learning OpenGL in Rust 00 - Setup 01 - Window 02 - OpenGL Context 0

Nerijus Arlauskas 348 Dec 11, 2022
Simple retro game made using Rust bracket-lib by following "Herbert Wolverson's Hands on Rust" book.

Flappy Dragon Code from This program is a result of a tutorial i followed from Herbert Wolverson's Hands-on Rust Effective Learning through 2D Game De

Praneeth Chinthaka Ranasinghe 1 Feb 7, 2022
A rust chess implementation using a neural network scoring function built on huggingface/candle + rust + wasm

Rusty Chess What is it? Rusty Chess aims to be a high quality embeddable chess engine that runs entirely locally in the browser (no backend required).

Gareth 3 Nov 3, 2023
A Rust wrapper and bindings of Allegro 5 game programming library

RustAllegro A thin Rust wrapper of Allegro 5. Game loop example extern crate allegro; extern crate allegro_font; use allegro::*; use allegro_font::*;

null 80 Dec 31, 2022
High performance Rust ECS library

Legion aims to be a feature rich high performance Entity component system (ECS) library for Rust game projects with minimal boilerplate. Getting Start

Amethyst Engine 1.4k Jan 5, 2023
A refreshingly simple data-driven game engine built in Rust

What is Bevy? Bevy is a refreshingly simple data-driven game engine built in Rust. It is free and open-source forever! WARNING Bevy is still in the ve

Bevy Engine 21.1k Jan 4, 2023