wasmer icon indicating copy to clipboard operation
wasmer copied to clipboard

cargo: don't pull in both universal and dylib engines for wasmer crate

Open vavrusa opened this issue 4 years ago • 0 comments

Thanks for proposing a new feature!

Motivation

Importing wasmer crate with either compiler flag automatically pulls in both universal and dylib engines. Ideally you should be able to select which one do you want to use and use only that.

Proposed solution

Engines can't be constructed via new() without a compiler flag. No engine can only construct with a headless() method. Refactor the engines so that it doesn't depend on the compiler flag and "headless" is just an implementation of the Compiler trait.

Alternatives

Figure out some sort of feature matrix.

Additional context

Discussed here https://github.com/wasmerio/wasmer/pull/2455

vavrusa avatar Jul 08 '21 19:07 vavrusa