initial commit
This commit is contained in:
commit
5322ffa5d7
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/target
|
||||
/Cargo.lock
|
19
Cargo.toml
Normal file
19
Cargo.toml
Normal 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]
|
8
crates/streamfer-core/Cargo.toml
Normal file
8
crates/streamfer-core/Cargo.toml
Normal 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]
|
14
crates/streamfer-core/src/lib.rs
Normal file
14
crates/streamfer-core/src/lib.rs
Normal 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
1596
crates/streamfer-engine/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
12
crates/streamfer-engine/Cargo.toml
Normal file
12
crates/streamfer-engine/Cargo.toml
Normal 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"
|
1
crates/streamfer-engine/src/lib.rs
Normal file
1
crates/streamfer-engine/src/lib.rs
Normal file
@ -0,0 +1 @@
|
||||
cargo_component_bindings::generate!();
|
8
crates/streamfer-engine/wit/infer.wit
Normal file
8
crates/streamfer-engine/wit/infer.wit
Normal file
@ -0,0 +1,8 @@
|
||||
interface infer {
|
||||
enum cap {
|
||||
cap-codec-h264,
|
||||
cap-codec-h265,
|
||||
}
|
||||
|
||||
get-capabilities: func() -> list<cap>
|
||||
}
|
6
crates/streamfer-engine/wit/streamfer.wit
Normal file
6
crates/streamfer-engine/wit/streamfer.wit
Normal file
@ -0,0 +1,6 @@
|
||||
package streamfer:main
|
||||
|
||||
|
||||
world streamfer {
|
||||
export infer
|
||||
}
|
8
crates/streamfer-plugin-nvdec/Cargo.toml
Normal file
8
crates/streamfer-plugin-nvdec/Cargo.toml
Normal 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]
|
14
crates/streamfer-plugin-nvdec/src/lib.rs
Normal file
14
crates/streamfer-plugin-nvdec/src/lib.rs
Normal 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);
|
||||
}
|
||||
}
|
8
crates/streamfer-plugin/Cargo.toml
Normal file
8
crates/streamfer-plugin/Cargo.toml
Normal 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]
|
14
crates/streamfer-plugin/src/lib.rs
Normal file
14
crates/streamfer-plugin/src/lib.rs
Normal 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);
|
||||
}
|
||||
}
|
8
crates/streamfer-server/Cargo.toml
Normal file
8
crates/streamfer-server/Cargo.toml
Normal 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]
|
14
crates/streamfer-server/src/lib.rs
Normal file
14
crates/streamfer-server/src/lib.rs
Normal 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
14
src/lib.rs
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user