summaryrefslogtreecommitdiff
path: root/rust/wasm
diff options
context:
space:
mode:
Diffstat (limited to 'rust/wasm')
-rw-r--r--rust/wasm/Cargo.toml14
-rw-r--r--rust/wasm/README.md21
-rw-r--r--rust/wasm/src/wasm.rs1
3 files changed, 36 insertions, 0 deletions
diff --git a/rust/wasm/Cargo.toml b/rust/wasm/Cargo.toml
new file mode 100644
index 00000000..031437e5
--- /dev/null
+++ b/rust/wasm/Cargo.toml
@@ -0,0 +1,14 @@
+[package]
+name = "opencut-wasm"
+version = "0.1.2"
+edition = "2024"
+description = "Shared video editor logic compiled to WebAssembly"
+repository = "https://github.com/opencut/opencut"
+license = "MIT"
+
+[lib]
+path = "src/wasm.rs"
+crate-type = ["cdylib", "rlib"]
+
+[dependencies]
+time = { version = "0.1.0", path = "../crates/time", features = ["wasm"] }
diff --git a/rust/wasm/README.md b/rust/wasm/README.md
new file mode 100644
index 00000000..bb6f62e7
--- /dev/null
+++ b/rust/wasm/README.md
@@ -0,0 +1,21 @@
+# opencut-wasm
+
+Shared video editor logic compiled to WebAssembly. Used by the [OpenCut](https://github.com/opencut/opencut) web app.
+
+## Install
+
+```bash
+npm install opencut-wasm
+```
+
+## Usage
+
+```ts
+import { formatTimeCode } from "opencut-wasm";
+```
+
+All exports are documented in the [TypeScript definitions](./opencut_wasm.d.ts).
+
+## Source
+
+Functions are implemented in Rust under [`rust/crates/`](../crates/). This package is the compiled WebAssembly output — do not edit it directly.
diff --git a/rust/wasm/src/wasm.rs b/rust/wasm/src/wasm.rs
new file mode 100644
index 00000000..e852df5f
--- /dev/null
+++ b/rust/wasm/src/wasm.rs
@@ -0,0 +1 @@
+pub use time::*;