initial commit

This commit is contained in:
Andrey Tkachenko 2023-10-02 16:35:34 +04:00
commit 5322ffa5d7
17 changed files with 1748 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/target
/Cargo.lock

19
Cargo.toml Normal file
View File

@ -0,0 +1,19 @@
[package]
name = "streamfer"
version = "0.1.0"
edition = "2021"
categories = ["science", "multimedia", "web-assembly"]
description = "Streaming inference server"
keywords = ["inference", "server"]
license = "MIT OR Apache-2.0"
exclude = [".gitignore", ".cargo/config", ".github/**"]
resolver = "2"
[workspace]
members = [
"crates/streamfer-core",
"crates/streamfer-engine",
"crates/streamfer-plugin",
]
[dependencies]

2
README.md Normal file
View File

@ -0,0 +1,2 @@
# streamfer
Streaming inference server

View File

@ -0,0 +1,8 @@
[package]
name = "streamfer-core"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

1596
crates/streamfer-engine/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
[package]
name = "streamfer-engine"
version = "0.1.0"
edition = "2021"
[dependencies]
cargo-component-bindings = "0.0.0"
wasmtime = "13.0.0"
wit-bindgen = "0.12.0"
[package.metadata.component]
package = "streamfer:main"

View File

@ -0,0 +1 @@
cargo_component_bindings::generate!();

View File

@ -0,0 +1,8 @@
interface infer {
enum cap {
cap-codec-h264,
cap-codec-h265,
}
get-capabilities: func() -> list<cap>
}

View File

@ -0,0 +1,6 @@
package streamfer:main
world streamfer {
export infer
}

View File

@ -0,0 +1,8 @@
[package]
name = "streamfer-plugin-nvdec"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

View File

@ -0,0 +1,8 @@
[package]
name = "streamfer-plugin"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

View File

@ -0,0 +1,8 @@
[package]
name = "streamfer-server"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

14
src/lib.rs Normal file
View File

@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}