Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
SeanOMik
@SeanOMik@hachyderm.io  ·  activity timestamp 3 months ago

I have implemented an API for WASM modules for a game engine. I want to create tests for it to make sure that the API that the WASM scripts use are correctly implemented.

How could I build a test suite for this? Since I would have to compile the modules as well, I doubt just "cargo test" would be enough. Is there another testing tool that could be better for this?

#wasm #rust #softwaredevelopment

  • Copy link
  • Flag this post
  • Block
d@nny disc@ mc²
@hipsterelectron@circumstances.run replied  ·  activity timestamp 3 months ago
@SeanOMik wow this is so cool
  • Copy link
  • Flag this comment
  • Block
SeanOMik
@SeanOMik@hachyderm.io replied  ·  activity timestamp 3 months ago
@hipsterelectron thanks! I hope to make a blog post with a demo or something soon. Currently it's a lot of unsafe code 😂. I need to do some cleanup to make sure I don't have any unnecessary unsafe code. Its FFI, so unsafe is the nature of this unfortunately.

The past weekend, I exposed the asset API to WASM so you can load images now. Exposing the GLTF asset api should be easy, but it was easier to implement the image one first. You can spawn ECS entities in the world and with positions. After I expose GLTF, it should be possible to spawn a visible and renderable entity!!

The past month I had to rewrite the entire WASM API since I finally accepted that WIT and the component model just isnt as portable as raw WASM. I also have a lua scripting engine that is farther along, but tbh, its not as cool and since this is a hobby project cool makes things more fun lmfao.

  • Copy link
  • Flag this comment
  • Block
d@nny disc@ mc²
@hipsterelectron@circumstances.run replied  ·  activity timestamp 3 months ago
@SeanOMik wanted to do this for pants
  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.13 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login