diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e709565 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI + +on: + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: 'stable' + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install Python dependencies + run: pip install pytest + - name: Run tests + run: make test diff --git a/.gitignore b/.gitignore index 169780b..f3dd209 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ __pycache__/ .env pytest_cache/ .pytest_cache/ +*.pyc # Node node_modules/ @@ -28,6 +29,7 @@ target/ # C++ build/ +cpp/tests/simple_test # Coverage coverage/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ad968f6 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +.PHONY: test test-cpp test-go test-python + +test: test-cpp test-go test-python + +test-cpp: + $(MAKE) -C cpp test + +test-go: + $(MAKE) -C go test + +test-python: + $(MAKE) -C python test diff --git a/README.md b/README.md index 28057ec..34a50f3 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,64 @@ # MultixAI Protocol -MultixAI is a next-generation transport protocol optimized for AI-driven applications, real-time audio/video streaming, and seamless interoperability with modern web meeting technologies (WebTransport, WebRTC, etc.). +MultixAI is a unified, next-generation transport protocol for multiplexed AI, audio, and video streaming—optimized for real-time applications, AI-driven inference, and seamless interoperability with modern web technologies like WebRTC and WebTransport. Secure, extensible, and adapter-ready. + +--- ## 🚀 Project Goals -- **Unified Real-Time Streaming:** Efficiently handle AI inference, text, audio, and video streams over a single, multiplexed connection. -- **AI-First Features:** Native support for streaming tokens, batch inference, and model metadata alongside media. -- **Media Ready:** Low-latency audio/video streaming, adaptive bitrate, and live feedback. -- **Flexible Communication:** Request/response, bidirectional, and streaming models. +- **Unified Real-Time Streaming:** Efficient handling of AI inference, text, audio, and video over a single multiplexed connection. +- **AI-First Features:** Native support for streaming tokens, batch inference, and model metadata. +- **Media Ready:** Low-latency audio/video, adaptive bitrate, and live feedback. +- **Flexible Communication:** Supports request/response, bidirectional, and streaming models. - **Interoperability:** Adapter services for WebRTC, WebTransport, and legacy protocols. -- **Security by Design:** Encrypted and authenticated from the ground up. -- **Extensibility:** Future-proof headers, easy codec/model upgrades, modern design. +- **Security by Design:** Encrypted and authenticated at the protocol core. +- **Extensibility:** Modern, future-proof headers for easy codec and model upgrades. ## 📦 Key Features -- Multiplexed channels: AI, audio, video, control, and more over one secure connection. -- Efficient packet/header format for minimal overhead, maximal flexibility. -- Adapter architecture: Connect WebRTC/WebTransport to advanced AI features. -- Designed for browsers, mobile, and backend use cases. +- Multiplexed channels for AI, audio, video, and control data over one secure connection. +- Efficient packet/header format to minimize overhead and maximize flexibility. +- Adapter architecture for connecting WebRTC/WebTransport to advanced AI features. +- Designed for browsers, mobile, and backend services. ## 🔗 Architecture -``` + [WebRTC/WebTransport Client] <--> [Adapter Service] <--> [MultixAI Protocol & AI Services] - | - [AI Inference, Transcription, Moderation, etc.] -``` +| +[AI Inference, Transcription, Moderation, etc.] + ## 📚 Documentation -- [RFC-like Protocol Specification](./RFC.md) +- See [RFC-like Protocol Specification](./RFC.md) + +--- + +## 🛠 Development Setup + +This repository contains multi-language components. To build and test, install the following toolchains: + +- **C++17** compiler (e.g., `g++`) and `make` +- **Go 1.21+** +- **Python 3.10+** with `pytest` + +## 🧪 Testing + +To run all language test suites: + +```sh +make test +make test-cpp +make test-go +make test-python + +``` + -## 👷 Getting Started +--- -*(Coming soon: Reference implementation in Rust/Go. Contributions welcome!)* +**Instructions:** +- Copy the above markdown and save it as `README.md` in your `canvas` folder (or any project root). +- This file contains a unified project intro, goals, architecture, toolchain setup, and testing instructions. +Let me know if you need any **customizations or additional sections**! diff --git a/cpp/Makefile b/cpp/Makefile new file mode 100644 index 0000000..0927fe1 --- /dev/null +++ b/cpp/Makefile @@ -0,0 +1,10 @@ +.PHONY: test clean + +test: tests/simple_test + ./tests/simple_test + +tests/simple_test: tests/simple_test.cpp + g++ -std=c++17 tests/simple_test.cpp -o tests/simple_test + +clean: + rm -f tests/simple_test diff --git a/cpp/tests/simple_test.cpp b/cpp/tests/simple_test.cpp new file mode 100644 index 0000000..072c19a --- /dev/null +++ b/cpp/tests/simple_test.cpp @@ -0,0 +1,10 @@ +#include + +int add(int a, int b) { + return a + b; +} + +int main() { + assert(add(2, 2) == 4); + return 0; +} diff --git a/go/Makefile b/go/Makefile new file mode 100644 index 0000000..f5b03e1 --- /dev/null +++ b/go/Makefile @@ -0,0 +1,4 @@ +.PHONY: test + +test: + go test ./... diff --git a/go/calculator.go b/go/calculator.go new file mode 100644 index 0000000..bb63d36 --- /dev/null +++ b/go/calculator.go @@ -0,0 +1,5 @@ +package main + +func Add(a, b int) int { + return a + b +} diff --git a/go/calculator_test.go b/go/calculator_test.go new file mode 100644 index 0000000..1bbc50e --- /dev/null +++ b/go/calculator_test.go @@ -0,0 +1,9 @@ +package main + +import "testing" + +func TestAdd(t *testing.T) { + if Add(2, 2) != 4 { + t.Fatalf("expected 4, got %d", Add(2, 2)) + } +} diff --git a/go/go.mod b/go/go.mod new file mode 100644 index 0000000..3c14d44 --- /dev/null +++ b/go/go.mod @@ -0,0 +1,3 @@ +module github.com/MultixAI/go + +go 1.21 diff --git a/python/Makefile b/python/Makefile new file mode 100644 index 0000000..a41dc19 --- /dev/null +++ b/python/Makefile @@ -0,0 +1,4 @@ +.PHONY: test + +test: + pytest diff --git a/python/calc.py b/python/calc.py new file mode 100644 index 0000000..4693ad3 --- /dev/null +++ b/python/calc.py @@ -0,0 +1,2 @@ +def add(a, b): + return a + b diff --git a/python/test_calc.py b/python/test_calc.py new file mode 100644 index 0000000..fb8e75c --- /dev/null +++ b/python/test_calc.py @@ -0,0 +1,4 @@ +from calc import add + +def test_add(): + assert add(2, 2) == 4