Skip to content

Substituting syscalls #121

@kubkon

Description

@kubkon

Is it possible to substitute wasmtime's syscalls without modifying wasmtime-wasi sources, and in particular wasmtime-wasi/syscalls.rs?

For example, suppose I wanted to forbid the random_get syscall from accessing the host's source of entropy. Is modifying

pub unsafe extern "C" fn random_get(...)

the only way to achieve this? I've had a stab at this, and that's how I achieved this: kubkon/wasmtime. Please bear in mind that this is a simple proof-of-concept, nothing more.

I was thus wondering if there was perhaps a more elegant way of achieving the same, especially such that didn't involve modifying the core of wasmtime-wasi.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions