Commit Graph

7 Commits

Author SHA1 Message Date
Avi Kivity
fcb8d040e8 treewide: use Software Package Data Exchange (SPDX) license identifiers
Instead of lengthy blurbs, switch to single-line, machine-readable
standardized (https://spdx.dev) license identifiers. The Linux kernel
switched long ago, so there is strong precedent.

Three cases are handled: AGPL-only, Apache-only, and dual licensed.
For the latter case, I chose (AGPL-3.0-or-later and Apache-2.0),
reasoning that our changes are extensive enough to apply our license.

The changes we applied mechanically with a script, except to
licenses/README.md.

Closes #9937
2022-01-18 12:15:18 +01:00
Pavel Emelyanov
bb23986826 wasm: Localize it to database usage
The wasm::engine exists as a sharded<> service in main, but it's only
passed by local reference into database on start. There's no much profit
in keeping it at main scope, things get much simpler if keeping the
engine purely on database.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2021-09-15 17:35:17 +03:00
Piotr Sarna
4959136afd main: add wasm engine instantiation
Once the engine is up, it can be used to execute user-defined
functions.
2021-09-13 19:03:58 +02:00
Piotr Sarna
78afd518a8 wasm: add initial WebAssembly runtime implementation
The engine is based on wasmtime and is able to:
 - compile wasm text format to bytecode
 - run a given compiled function with custom arguments

This implementation is missing crucial features, like running
on any other types than 32-bit integers. It serves as a skeleton
for future full implementation.
2021-09-13 19:03:58 +02:00
Piotr Sarna
5e6fa47198 lang: add wasm_engine service
WASM engine stores the wasm runtime engine for user-defined functions.
2021-09-13 11:01:33 +02:00
Piotr Sarna
4caf57f730 import wasmtime.hh
Courtesy of https://github.com/bytecodealliance/wasmtime-cpp .
Taken as is, with a small licensing blurb added on top.
2021-09-13 11:01:33 +02:00
Piotr Sarna
4e952df470 lua: move to lang/ directory
Support for more languages is comming, so let's group them
in a separate directory.
2021-09-13 11:01:33 +02:00