ref-fvm icon indicating copy to clipboard operation
ref-fvm copied to clipboard

Add an integration test that defines a new syscall

Open Stebalien opened this issue 1 year ago • 2 comments

Basically, we need to make sure we can attach a new syscall to an FVM instance from a different crate. We should write an integration test that:

  1. Constructs a custom FVM with a custom kernel/syscall.
  2. Calls the custom syscall from an actor.

Stebalien avatar Dec 18 '23 17:12 Stebalien

@Stebalien for making the new custom syscall (for example math::doubleme) available to the wasm actor, I am thinking about creating a new crate containing the custom kernel and syscall, then in the wasm test actor, import that syscall module which I can then call to invoke the custom syscall, makes sense?

fridrik01 avatar Dec 21 '23 16:12 fridrik01

There's nothing special about the SDK (it's just a crate). You should be able to put that code inside your custom actor itself.

Stebalien avatar Dec 21 '23 16:12 Stebalien