diff --git a/Dockerfile.ytserver b/Dockerfile.ytserver index 6f279a1..e625127 100644 --- a/Dockerfile.ytserver +++ b/Dockerfile.ytserver @@ -1,3 +1,10 @@ +FROM rust:1.83-slim AS rust-builder +WORKDIR /build +RUN apt-get update && apt-get install -y python3 python3-pip && rm -rf /var/lib/apt/lists/* \ + && pip3 install --no-cache-dir --break-system-packages "maturin>=1.7,<2.0" +COPY automap_rs/ ./automap_rs/ +RUN cd automap_rs && maturin build --release --interpreter python3 --out /wheels + FROM python:3.12-slim @@ -14,6 +21,9 @@ WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt +COPY --from=rust-builder /wheels/*.whl /tmp/ +RUN pip install --no-cache-dir /tmp/*.whl && rm -f /tmp/*.whl + COPY yt-dlp_serv.py sticker_themes.py extra_stickers.py server_runtime.py render_progress.py video_text.py video_stickers.py video_render.py ./ COPY resources/fonts/ resources/fonts/ diff --git a/automap_rs/Cargo.lock b/automap_rs/Cargo.lock new file mode 100644 index 0000000..8d2a5fc --- /dev/null +++ b/automap_rs/Cargo.lock @@ -0,0 +1,180 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "automap_rs" +version = "0.1.0" +dependencies = [ + "pyo3", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "indoc" +version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a37b2691796cffeb8a8cd305ac66e65841559f147f4e63231d0eafa4db5384d1" +dependencies = [ + "rustversion", +] + +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "pyo3" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872" +dependencies = [ + "cfg-if", + "indoc", + "libc", + "memoffset", + "once_cell", + "portable-atomic", + "pyo3-build-config", + "pyo3-ffi", + "pyo3-macros", + "unindent", +] + +[[package]] +name = "pyo3-build-config" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb" +dependencies = [ + "once_cell", + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d" +dependencies = [ + "libc", + "pyo3-build-config", +] + +[[package]] +name = "pyo3-macros" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da" +dependencies = [ + "proc-macro2", + "pyo3-macros-backend", + "quote", + "syn", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028" +dependencies = [ + "heck", + "proc-macro2", + "pyo3-build-config", + "quote", + "syn", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "unindent" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" diff --git a/automap_rs/Cargo.toml b/automap_rs/Cargo.toml new file mode 100644 index 0000000..93cf872 --- /dev/null +++ b/automap_rs/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "automap_rs" +version = "0.1.0" +edition = "2021" + +[lib] +name = "automap_rs" +crate-type = ["cdylib"] + +[dependencies] +pyo3 = { version = "0.23", features = ["extension-module", "abi3-py310"] } diff --git a/automap_rs/pyproject.toml b/automap_rs/pyproject.toml new file mode 100644 index 0000000..652fc55 --- /dev/null +++ b/automap_rs/pyproject.toml @@ -0,0 +1,9 @@ +[build-system] +requires = ["maturin>=1.7,<2.0"] +build-backend = "maturin" + +[project] +name = "automap_rs" +version = "0.1.0" +requires-python = ">=3.10" +dependencies = [] diff --git a/automap_rs/src/lib.rs b/automap_rs/src/lib.rs new file mode 100644 index 0000000..700fef5 --- /dev/null +++ b/automap_rs/src/lib.rs @@ -0,0 +1,254 @@ +use pyo3::prelude::*; +use std::io::{Read, Write}; +use std::process::{Command, Stdio}; + +/// Describes a single dynamic overlay layer passed from Python as a tuple: +/// `(rgba_bytes, x, y, width, height, start_sec, fade_in_sec)`. +#[derive(FromPyObject)] +struct DynamicLayer { + rgba: Vec, + x: i32, + y: i32, + width: usize, + height: usize, + start_sec: f32, + fade_in_sec: f32, +} + +/// Composites the background video, static foreground, dynamic overlays, and intro veil +/// frame-by-frame in a single reusable RGBA buffer, streaming directly to/from `ffmpeg`. +#[pyfunction] +#[pyo3(signature = (bg_video_path, static_rgba, dynamic_layers, veil_duration, audio_path, output_path, width, height, fps, duration, codec, preset=None, draft=false))] +#[allow(clippy::too_many_arguments)] +fn render_video_rs( + py: Python<'_>, + bg_video_path: &str, + static_rgba: &[u8], + dynamic_layers: Vec, + veil_duration: f32, + audio_path: Option<&str>, + output_path: &str, + width: usize, + height: usize, + fps: u32, + duration: f32, + codec: &str, + preset: Option<&str>, + draft: bool, +) -> PyResult<()> { + let expected_len = width * height * 4; + if static_rgba.len() != expected_len { + return Err(pyo3::exceptions::PyValueError::new_err(format!( + "static_rgba length {} does not match {}x{}x4 ({})", + static_rgba.len(), + width, + height, + expected_len + ))); + } + + // Release Python's GIL so other Flask/worker threads are not blocked during rendering. + py.allow_threads(|| { + let total_frames = (duration * fps as f32).round().max(1.0) as u32; + let dur_str = format!("{duration:.3}"); + + // 1. Spawn ffmpeg decoder: reads the prepared background MP4 and outputs raw RGBA frames. + let mut decoder = Command::new("ffmpeg") + .args([ + "-y", + "-i", + bg_video_path, + "-t", + &dur_str, + "-f", + "rawvideo", + "-pix_fmt", + "rgba", + "-", + ]) + .stdout(Stdio::piped()) + .stderr(Stdio::null()) + .spawn() + .map_err(|e| pyo3::exceptions::PyRuntimeError::new_err(format!("ffmpeg decoder spawn failed: {e}")))?; + + let mut dec_out = decoder + .stdout + .take() + .ok_or_else(|| pyo3::exceptions::PyRuntimeError::new_err("missing decoder stdout"))?; + + // 2. Build ffmpeg encoder args: reads raw RGBA frames from stdin and encodes with the chosen codec. + let size_str = format!("{width}x{height}"); + let fps_str = fps.to_string(); + let mut enc_args: Vec = vec![ + "-y".into(), + "-f".into(), + "rawvideo".into(), + "-pix_fmt".into(), + "rgba".into(), + "-s".into(), + size_str, + "-r".into(), + fps_str, + "-i".into(), + "-".into(), + ]; + + if let Some(aud) = audio_path { + enc_args.extend(["-i".into(), aud.into(), "-t".into(), dur_str.clone(), "-c:a".into(), "aac".into()]); + } + + enc_args.extend(["-c:v".into(), codec.into()]); + if let Some(p) = preset { + enc_args.extend(["-preset".into(), p.into()]); + } + if draft { + enc_args.extend(["-vf".into(), "scale=720:1280:flags=bicubic".into()]); + } + enc_args.extend(["-pix_fmt".into(), "yuv420p".into(), output_path.into()]); + + let mut encoder = Command::new("ffmpeg") + .args(&enc_args) + .stdin(Stdio::piped()) + .stderr(Stdio::null()) + .spawn() + .map_err(|e| pyo3::exceptions::PyRuntimeError::new_err(format!("ffmpeg encoder spawn failed: {e}")))?; + + let mut enc_in = encoder + .stdin + .take() + .ok_or_else(|| pyo3::exceptions::PyRuntimeError::new_err("missing encoder stdin"))?; + + // 3. Single reusable frame buffer (~8.3 MB for 1080x1920 RGBA) to avoid per-frame allocations. + let mut frame_buf = vec![0u8; expected_len]; + + for frame_idx in 0..total_frames { + if dec_out.read_exact(&mut frame_buf).is_err() { + break; + } + + let t = frame_idx as f32 / fps as f32; + + // Layer 1: flattened static foreground (map, title, watermark). + blend_full_in_place(&mut frame_buf, static_rgba, 1.0); + + // Layer 2: dynamic overlays (subscribe badge, stars) with optional fade-in. + for layer in &dynamic_layers { + if t < layer.start_sec { + continue; + } + let opacity = if layer.fade_in_sec > 0.0 { + ((t - layer.start_sec) / layer.fade_in_sec).clamp(0.0, 1.0) + } else { + 1.0 + }; + blend_rect_in_place( + &mut frame_buf, + width, + height, + &layer.rgba, + layer.x, + layer.y, + layer.width, + layer.height, + opacity, + ); + } + + // Layer 3: intro fade-in veil (darkens RGB channels linearly at the start). + if veil_duration > 0.0 && t < veil_duration { + let veil_alpha = (0.88 * (1.0 - (t / veil_duration))).clamp(0.0, 1.0); + let brightness = 1.0 - veil_alpha; + for px in frame_buf.chunks_exact_mut(4) { + px[0] = (px[0] as f32 * brightness) as u8; + px[1] = (px[1] as f32 * brightness) as u8; + px[2] = (px[2] as f32 * brightness) as u8; + } + } + + // Stream the composited frame into ffmpeg's stdin. + enc_in + .write_all(&frame_buf) + .map_err(|e| pyo3::exceptions::PyRuntimeError::new_err(format!("encoder write failed: {e}")))?; + } + + // Close stdin so ffmpeg flushes and finalizes the MP4 container. + drop(enc_in); + let status = encoder + .wait() + .map_err(|e| pyo3::exceptions::PyRuntimeError::new_err(format!("encoder wait failed: {e}")))?; + let _ = decoder.wait(); + + if !status.success() { + return Err(pyo3::exceptions::PyRuntimeError::new_err(format!( + "ffmpeg encoder exited with status {status}" + ))); + } + Ok(()) + }) +} + +/// Alpha-blends a full-canvas RGBA overlay onto `base` in place. +fn blend_full_in_place(base: &mut [u8], overlay: &[u8], opacity: f32) { + if opacity <= 0.0 { + return; + } + for (bg, fg) in base.chunks_exact_mut(4).zip(overlay.chunks_exact(4)) { + blend_pixel(bg, fg, opacity); + } +} + +/// Alpha-blends a positioned rectangular RGBA overlay onto `base` in place, clipped to canvas bounds. +#[allow(clippy::too_many_arguments)] +fn blend_rect_in_place( + base: &mut [u8], + canvas_w: usize, + canvas_h: usize, + overlay: &[u8], + x: i32, + y: i32, + ov_w: usize, + ov_h: usize, + opacity: f32, +) { + if opacity <= 0.0 || ov_w == 0 || ov_h == 0 { + return; + } + let start_y = y.max(0) as usize; + let end_y = (y + ov_h as i32).min(canvas_h as i32).max(0) as usize; + let start_x = x.max(0) as usize; + let end_x = (x + ov_w as i32).min(canvas_w as i32).max(0) as usize; + + for cy in start_y..end_y { + let oy = (cy as i32 - y) as usize; + for cx in start_x..end_x { + let ox = (cx as i32 - x) as usize; + let bg_idx = (cy * canvas_w + cx) * 4; + let fg_idx = (oy * ov_w + ox) * 4; + if fg_idx + 4 <= overlay.len() && bg_idx + 4 <= base.len() { + blend_pixel(&mut base[bg_idx..bg_idx + 4], &overlay[fg_idx..fg_idx + 4], opacity); + } + } + } +} + +#[inline(always)] +fn blend_pixel(bg: &mut [u8], fg: &[u8], opacity: f32) { + let fg_a = (fg[3] as f32 / 255.0) * opacity; + if fg_a <= 0.0 { + return; + } + if fg_a >= 1.0 { + bg.copy_from_slice(fg); + return; + } + let inv_a = 1.0 - fg_a; + bg[0] = (fg[0] as f32 * fg_a + bg[0] as f32 * inv_a) as u8; + bg[1] = (fg[1] as f32 * fg_a + bg[1] as f32 * inv_a) as u8; + bg[2] = (fg[2] as f32 * fg_a + bg[2] as f32 * inv_a) as u8; +} + +#[pymodule] +fn automap_rs(m: &Bound<'_, PyModule>) -> PyResult<()> { + m.add_function(wrap_pyfunction!(render_video_rs, m)?)?; + Ok(()) +} diff --git a/automap_rs/target/.rustc_info.json b/automap_rs/target/.rustc_info.json new file mode 100644 index 0000000..b931fdd --- /dev/null +++ b/automap_rs/target/.rustc_info.json @@ -0,0 +1 @@ +{"rustc_fingerprint":13492266880367462578,"outputs":{"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/opt/homebrew/Cellar/rust/1.100.0\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"aes\"\ntarget_feature=\"crc\"\ntarget_feature=\"dit\"\ntarget_feature=\"dotprod\"\ntarget_feature=\"dpb\"\ntarget_feature=\"dpb2\"\ntarget_feature=\"fcma\"\ntarget_feature=\"fhm\"\ntarget_feature=\"flagm\"\ntarget_feature=\"fp16\"\ntarget_feature=\"frintts\"\ntarget_feature=\"jsconv\"\ntarget_feature=\"lor\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"paca\"\ntarget_feature=\"pacg\"\ntarget_feature=\"pan\"\ntarget_feature=\"pmuv3\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rcpc2\"\ntarget_feature=\"rdm\"\ntarget_feature=\"sb\"\ntarget_feature=\"sha2\"\ntarget_feature=\"sha3\"\ntarget_feature=\"ssbs\"\ntarget_feature=\"vh\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_primitive_alignment=\"128\"\ntarget_has_atomic_primitive_alignment=\"16\"\ntarget_has_atomic_primitive_alignment=\"32\"\ntarget_has_atomic_primitive_alignment=\"64\"\ntarget_has_atomic_primitive_alignment=\"8\"\ntarget_has_atomic_primitive_alignment=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n","stderr":""},"11448405147791475176":{"success":true,"status":"","code":0,"stdout":"rustc 1.100.0 (0ef1bc386 2026-11-09) (Homebrew)\nbinary: rustc\ncommit-hash: 0ef1bc386059596dada8fb65b50425aab2ea637a\ncommit-date: 2026-11-09\nhost: aarch64-apple-darwin\nrelease: 1.100.0\nLLVM version: 23.1.5\n","stderr":""}},"successes":{}} \ No newline at end of file diff --git a/automap_rs/target/CACHEDIR.TAG b/automap_rs/target/CACHEDIR.TAG new file mode 100644 index 0000000..20d7c31 --- /dev/null +++ b/automap_rs/target/CACHEDIR.TAG @@ -0,0 +1,3 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by cargo. +# For information about cache directory tags see https://bford.info/cachedir/ diff --git a/automap_rs/target/debug/.cargo-build-lock b/automap_rs/target/debug/.cargo-build-lock new file mode 100644 index 0000000..e69de29 diff --git a/automap_rs/target/debug/.cargo-lock b/automap_rs/target/debug/.cargo-lock new file mode 100644 index 0000000..e69de29 diff --git a/automap_rs/target/debug/incremental/automap_rs-03mdteeaxhl7a/s-ho6v7idtob-00f4s6w-053l8ezgn05mnd6yipvwutoz3/dep-graph.bin b/automap_rs/target/debug/incremental/automap_rs-03mdteeaxhl7a/s-ho6v7idtob-00f4s6w-053l8ezgn05mnd6yipvwutoz3/dep-graph.bin new file mode 100644 index 0000000..eb242e1 Binary files /dev/null and b/automap_rs/target/debug/incremental/automap_rs-03mdteeaxhl7a/s-ho6v7idtob-00f4s6w-053l8ezgn05mnd6yipvwutoz3/dep-graph.bin differ diff --git a/automap_rs/target/debug/incremental/automap_rs-03mdteeaxhl7a/s-ho6v7idtob-00f4s6w-053l8ezgn05mnd6yipvwutoz3/query-cache.bin b/automap_rs/target/debug/incremental/automap_rs-03mdteeaxhl7a/s-ho6v7idtob-00f4s6w-053l8ezgn05mnd6yipvwutoz3/query-cache.bin new file mode 100644 index 0000000..1bc5044 Binary files /dev/null and b/automap_rs/target/debug/incremental/automap_rs-03mdteeaxhl7a/s-ho6v7idtob-00f4s6w-053l8ezgn05mnd6yipvwutoz3/query-cache.bin differ diff --git a/automap_rs/target/debug/incremental/automap_rs-03mdteeaxhl7a/s-ho6v7idtob-00f4s6w-053l8ezgn05mnd6yipvwutoz3/work-products.bin b/automap_rs/target/debug/incremental/automap_rs-03mdteeaxhl7a/s-ho6v7idtob-00f4s6w-053l8ezgn05mnd6yipvwutoz3/work-products.bin new file mode 100644 index 0000000..7702f56 Binary files /dev/null and b/automap_rs/target/debug/incremental/automap_rs-03mdteeaxhl7a/s-ho6v7idtob-00f4s6w-053l8ezgn05mnd6yipvwutoz3/work-products.bin differ diff --git a/automap_rs/target/debug/incremental/automap_rs-03mdteeaxhl7a/s-ho6v7idtob-00f4s6w.lock b/automap_rs/target/debug/incremental/automap_rs-03mdteeaxhl7a/s-ho6v7idtob-00f4s6w.lock new file mode 100644 index 0000000..e69de29 diff --git a/automap_rs/target/debug/incremental/automap_rs-11vr70w6zn4n0/s-ho6v7idtob-1b8swy9-cr5h3jxol1ci7lsrxxq8lay05/dep-graph.bin b/automap_rs/target/debug/incremental/automap_rs-11vr70w6zn4n0/s-ho6v7idtob-1b8swy9-cr5h3jxol1ci7lsrxxq8lay05/dep-graph.bin new file mode 100644 index 0000000..0de30b2 Binary files /dev/null and b/automap_rs/target/debug/incremental/automap_rs-11vr70w6zn4n0/s-ho6v7idtob-1b8swy9-cr5h3jxol1ci7lsrxxq8lay05/dep-graph.bin differ diff --git a/automap_rs/target/debug/incremental/automap_rs-11vr70w6zn4n0/s-ho6v7idtob-1b8swy9-cr5h3jxol1ci7lsrxxq8lay05/query-cache.bin b/automap_rs/target/debug/incremental/automap_rs-11vr70w6zn4n0/s-ho6v7idtob-1b8swy9-cr5h3jxol1ci7lsrxxq8lay05/query-cache.bin new file mode 100644 index 0000000..1544283 Binary files /dev/null and b/automap_rs/target/debug/incremental/automap_rs-11vr70w6zn4n0/s-ho6v7idtob-1b8swy9-cr5h3jxol1ci7lsrxxq8lay05/query-cache.bin differ diff --git a/automap_rs/target/debug/incremental/automap_rs-11vr70w6zn4n0/s-ho6v7idtob-1b8swy9-cr5h3jxol1ci7lsrxxq8lay05/work-products.bin b/automap_rs/target/debug/incremental/automap_rs-11vr70w6zn4n0/s-ho6v7idtob-1b8swy9-cr5h3jxol1ci7lsrxxq8lay05/work-products.bin new file mode 100644 index 0000000..7702f56 Binary files /dev/null and b/automap_rs/target/debug/incremental/automap_rs-11vr70w6zn4n0/s-ho6v7idtob-1b8swy9-cr5h3jxol1ci7lsrxxq8lay05/work-products.bin differ diff --git a/automap_rs/target/debug/incremental/automap_rs-11vr70w6zn4n0/s-ho6v7idtob-1b8swy9.lock b/automap_rs/target/debug/incremental/automap_rs-11vr70w6zn4n0/s-ho6v7idtob-1b8swy9.lock new file mode 100644 index 0000000..e69de29 diff --git a/automap_rs/target/flycheck0/stderr b/automap_rs/target/flycheck0/stderr new file mode 100644 index 0000000..d46fe2e --- /dev/null +++ b/automap_rs/target/flycheck0/stderr @@ -0,0 +1,9 @@ + Checking unindent v0.2.4 + Checking once_cell v1.21.4 + Checking libc v0.2.191 + Checking cfg-if v1.0.5 + Checking memoffset v0.9.1 + Checking pyo3-ffi v0.23.5 + Checking pyo3 v0.23.5 + Checking automap_rs v0.1.0 (/Users/roman/Documents/python/AutoMap-cli/automap_rs) + Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.46s diff --git a/automap_rs/target/flycheck0/stdout b/automap_rs/target/flycheck0/stdout new file mode 100644 index 0000000..5a957ac --- /dev/null +++ b/automap_rs/target/flycheck0/stdout @@ -0,0 +1,40 @@ +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#target-lexicon@0.12.16","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/target-lexicon-0.12.16/Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/target-lexicon-0.12.16/build.rs","edition":"2018","doc":false,"doctest":false,"test":false},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["default"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/target-lexicon/9067799d5853f056/out/build_script_build"],"executable":null,"fresh":true} +{"reason":"build-script-executed","package_id":"registry+https://github.com/rust-lang/crates.io-index#target-lexicon@0.12.16","linked_libs":[],"linked_paths":[],"cfgs":["feature=\"rust_1_40\""],"env":[],"out_dir":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/target-lexicon/8bc8d0eff91159e8/out"} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#once_cell@1.21.4","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/once_cell-1.21.4/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"once_cell","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/once_cell-1.21.4/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["alloc","default","race","std"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/once_cell/4b230fe50bfa6770/out/libonce_cell-4b230fe50bfa6770.rlib","/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/once_cell/4b230fe50bfa6770/out/libonce_cell-4b230fe50bfa6770.rmeta"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.107","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.107/Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.107/build.rs","edition":"2021","doc":false,"doctest":false,"test":false},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["proc-macro"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/proc-macro2/d83dbcd9537a2475/out/build_script_build"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#unicode-ident@1.0.27","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-ident-1.0.27/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"unicode_ident","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-ident-1.0.27/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/unicode-ident/80cf9a521bde65f3/out/libunicode_ident-80cf9a521bde65f3.rlib","/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/unicode-ident/80cf9a521bde65f3/out/libunicode_ident-80cf9a521bde65f3.rmeta"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#quote@1.0.47","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.47/Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.47/build.rs","edition":"2021","doc":false,"doctest":false,"test":false},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["default","proc-macro"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/quote/bc4f01faa307fd2d/out/build_script_build"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#libc@0.2.191","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.191/Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.191/build.rs","edition":"2021","doc":false,"doctest":false,"test":false},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["default","std"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/libc/35d002a18bd74e61/out/build_script_build"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#autocfg@1.5.1","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.1/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"autocfg","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.1/src/lib.rs","edition":"2015","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/autocfg/552c05116e34ec66/out/libautocfg-552c05116e34ec66.rlib","/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/autocfg/552c05116e34ec66/out/libautocfg-552c05116e34ec66.rmeta"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#heck@0.5.0","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/heck-0.5.0/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"heck","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/heck-0.5.0/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/heck/1c6f4c1c38f6e0fe/out/libheck-1c6f4c1c38f6e0fe.rlib","/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/heck/1c6f4c1c38f6e0fe/out/libheck-1c6f4c1c38f6e0fe.rmeta"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#target-lexicon@0.12.16","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/target-lexicon-0.12.16/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"target_lexicon","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/target-lexicon-0.12.16/src/lib.rs","edition":"2018","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["default"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/target-lexicon/7e50de7f0c612bb9/out/libtarget_lexicon-7e50de7f0c612bb9.rlib","/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/target-lexicon/7e50de7f0c612bb9/out/libtarget_lexicon-7e50de7f0c612bb9.rmeta"],"executable":null,"fresh":true} +{"reason":"build-script-executed","package_id":"registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.107","linked_libs":[],"linked_paths":[],"cfgs":["wrap_proc_macro","proc_macro_span_location","proc_macro_span_file"],"env":[],"out_dir":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/proc-macro2/eaefcaf5c0bec33f/out"} +{"reason":"build-script-executed","package_id":"registry+https://github.com/rust-lang/crates.io-index#quote@1.0.47","linked_libs":[],"linked_paths":[],"cfgs":[],"env":[],"out_dir":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/quote/631ad1331c718e40/out"} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#memoffset@0.9.1","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memoffset-0.9.1/Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memoffset-0.9.1/build.rs","edition":"2015","doc":false,"doctest":false,"test":false},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["default"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/memoffset/d85990f96c43ffa3/out/build_script_build"],"executable":null,"fresh":true} +{"reason":"build-script-executed","package_id":"registry+https://github.com/rust-lang/crates.io-index#libc@0.2.191","linked_libs":[],"linked_paths":[],"cfgs":[],"env":[],"out_dir":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/libc/ca3568e9553dd309/out"} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#indoc@2.0.8","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indoc-2.0.8/Cargo.toml","target":{"kind":["proc-macro"],"crate_types":["proc-macro"],"name":"indoc","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indoc-2.0.8/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/indoc/ca103b362c7733e7/out/libindoc-ca103b362c7733e7.dylib"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3-build-config@0.23.5","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-build-config-0.23.5/Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-build-config-0.23.5/build.rs","edition":"2021","doc":false,"doctest":false,"test":false},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["abi3","abi3-py310","abi3-py311","abi3-py312","default","extension-module","resolve-config"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-build-config/9769b07181fe07b9/out/build_script_build"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.107","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.107/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"proc_macro2","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.107/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["proc-macro"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/proc-macro2/359cd52d4253f21f/out/libproc_macro2-359cd52d4253f21f.rlib","/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/proc-macro2/359cd52d4253f21f/out/libproc_macro2-359cd52d4253f21f.rmeta"],"executable":null,"fresh":true} +{"reason":"build-script-executed","package_id":"registry+https://github.com/rust-lang/crates.io-index#memoffset@0.9.1","linked_libs":[],"linked_paths":[],"cfgs":["tuple_ty","allow_clippy","maybe_uninit","doctests","raw_ref_macros","stable_const","stable_offset_of"],"env":[],"out_dir":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/memoffset/117401218d8f94f3/out"} +{"reason":"build-script-executed","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3-build-config@0.23.5","linked_libs":[],"linked_paths":[],"cfgs":[],"env":[],"out_dir":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-build-config/21292fcb6bdc2ec1/out"} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#quote@1.0.47","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.47/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"quote","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.47/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["default","proc-macro"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/quote/373ebf009b2758db/out/libquote-373ebf009b2758db.rlib","/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/quote/373ebf009b2758db/out/libquote-373ebf009b2758db.rmeta"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3-build-config@0.23.5","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-build-config-0.23.5/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"pyo3_build_config","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-build-config-0.23.5/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["abi3","abi3-py310","abi3-py311","abi3-py312","default","extension-module","resolve-config"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-build-config/e2f016b200efba87/out/libpyo3_build_config-e2f016b200efba87.rlib","/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-build-config/e2f016b200efba87/out/libpyo3_build_config-e2f016b200efba87.rmeta"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#syn@2.0.119","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.119/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"syn","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.119/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["clone-impls","default","derive","extra-traits","full","parsing","printing","proc-macro"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/syn/0ecde44b72f15dee/out/libsyn-0ecde44b72f15dee.rlib","/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/syn/0ecde44b72f15dee/out/libsyn-0ecde44b72f15dee.rmeta"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3-macros-backend@0.23.5","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-macros-backend-0.23.5/Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-macros-backend-0.23.5/build.rs","edition":"2021","doc":false,"doctest":false,"test":false},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-macros-backend/e0a25df7de866a8a/out/build_script_build"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3-ffi@0.23.5","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.23.5/Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.23.5/build.rs","edition":"2021","doc":false,"doctest":false,"test":false},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["abi3","abi3-py310","abi3-py311","abi3-py312","default","extension-module"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-ffi/7a635c756b732e1e/out/build_script_build"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3@0.23.5","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-0.23.5/Cargo.toml","target":{"kind":["custom-build"],"crate_types":["bin"],"name":"build-script-build","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-0.23.5/build.rs","edition":"2021","doc":false,"doctest":false,"test":false},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["abi3","abi3-py310","abi3-py311","abi3-py312","default","extension-module","indoc","macros","pyo3-macros","unindent"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3/d6dc76177b0f5135/out/build_script_build"],"executable":null,"fresh":true} +{"reason":"build-script-executed","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3-ffi@0.23.5","linked_libs":[],"linked_paths":[],"cfgs":["Py_3_7","Py_3_8","Py_3_9","Py_3_10","Py_LIMITED_API","rustc_has_once_lock","invalid_from_utf8_lint","c_str_lit","diagnostic_namespace","fn_ptr_eq"],"env":[],"out_dir":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-ffi/da2610927d2e3f52/out"} +{"reason":"build-script-executed","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3-macros-backend@0.23.5","linked_libs":[],"linked_paths":[],"cfgs":["rustc_has_once_lock","invalid_from_utf8_lint","c_str_lit","diagnostic_namespace","fn_ptr_eq"],"env":[],"out_dir":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-macros-backend/b65ca383b23305cf/out"} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3-macros-backend@0.23.5","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-macros-backend-0.23.5/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"pyo3_macros_backend","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-macros-backend-0.23.5/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-macros-backend/606655f5d49421cd/out/libpyo3_macros_backend-606655f5d49421cd.rlib","/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-macros-backend/606655f5d49421cd/out/libpyo3_macros_backend-606655f5d49421cd.rmeta"],"executable":null,"fresh":true} +{"reason":"build-script-executed","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3@0.23.5","linked_libs":[],"linked_paths":[],"cfgs":["Py_3_7","Py_3_8","Py_3_9","Py_3_10","Py_LIMITED_API","rustc_has_once_lock","invalid_from_utf8_lint","c_str_lit","diagnostic_namespace","fn_ptr_eq"],"env":[],"out_dir":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3/b8f3cfbe695deadd/out"} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3-macros@0.23.5","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-macros-0.23.5/Cargo.toml","target":{"kind":["proc-macro"],"crate_types":["proc-macro"],"name":"pyo3_macros","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-macros-0.23.5/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":0,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-macros/afaa33b3ba1edeef/out/libpyo3_macros-afaa33b3ba1edeef.dylib"],"executable":null,"fresh":true} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#cfg-if@1.0.5","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cfg-if-1.0.5/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"cfg_if","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cfg-if-1.0.5/src/lib.rs","edition":"2018","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/cfg-if/665268d445033861/out/libcfg_if-665268d445033861.rmeta"],"executable":null,"fresh":false} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#memoffset@0.9.1","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memoffset-0.9.1/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"memoffset","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memoffset-0.9.1/src/lib.rs","edition":"2015","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["default"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/memoffset/059096831bc636bd/out/libmemoffset-059096831bc636bd.rmeta"],"executable":null,"fresh":false} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#unindent@0.2.4","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unindent-0.2.4/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"unindent","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unindent-0.2.4/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/unindent/5f26016c15af04ba/out/libunindent-5f26016c15af04ba.rmeta"],"executable":null,"fresh":false} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#once_cell@1.21.4","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/once_cell-1.21.4/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"once_cell","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/once_cell-1.21.4/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["alloc","default","race","std"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/once_cell/a6a44e9045c80b76/out/libonce_cell-a6a44e9045c80b76.rmeta"],"executable":null,"fresh":false} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#libc@0.2.191","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.191/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"libc","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.191/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["default","std"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/libc/9d44feb239faa741/out/liblibc-9d44feb239faa741.rmeta"],"executable":null,"fresh":false} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3-ffi@0.23.5","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.23.5/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"pyo3_ffi","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.23.5/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["abi3","abi3-py310","abi3-py311","abi3-py312","default","extension-module"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3-ffi/02b391b8a7fa9d36/out/libpyo3_ffi-02b391b8a7fa9d36.rmeta"],"executable":null,"fresh":false} +{"reason":"compiler-artifact","package_id":"registry+https://github.com/rust-lang/crates.io-index#pyo3@0.23.5","manifest_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-0.23.5/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"pyo3","src_path":"/Users/roman/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-0.23.5/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":["abi3","abi3-py310","abi3-py311","abi3-py312","default","extension-module","indoc","macros","pyo3-macros","unindent"],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/pyo3/6071a7f79cb13bf7/out/libpyo3-6071a7f79cb13bf7.rmeta"],"executable":null,"fresh":false} +{"reason":"compiler-artifact","package_id":"path+file:///Users/roman/Documents/python/AutoMap-cli/automap_rs#0.1.0","manifest_path":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/Cargo.toml","target":{"kind":["cdylib"],"crate_types":["cdylib"],"name":"automap_rs","src_path":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/src/lib.rs","edition":"2021","doc":true,"doctest":false,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/automap_rs/ccfc803e3b4d5288/out/libautomap_rs-ccfc803e3b4d5288.rmeta"],"executable":null,"fresh":false} +{"reason":"compiler-artifact","package_id":"path+file:///Users/roman/Documents/python/AutoMap-cli/automap_rs#0.1.0","manifest_path":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/Cargo.toml","target":{"kind":["cdylib"],"crate_types":["cdylib"],"name":"automap_rs","src_path":"/Users/roman/Documents/python/AutoMap-cli/automap_rs/src/lib.rs","edition":"2021","doc":true,"doctest":false,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":true},"features":[],"filenames":["/Users/roman/Documents/python/AutoMap-cli/automap_rs/target/debug/build/automap_rs/086bbb17a8794947/out/libautomap_rs-086bbb17a8794947.rmeta"],"executable":null,"fresh":false} +{"reason":"build-finished","success":true} diff --git a/yt-dlp_serv.py b/yt-dlp_serv.py index 7eb00b6..4dc0fa6 100644 --- a/yt-dlp_serv.py +++ b/yt-dlp_serv.py @@ -797,40 +797,102 @@ def _veil_mask(t: float) -> np.ndarray: # Static layers are composed once into a single RGBA foreground. clips = _flatten_static_layers(clips, (canvas_w, canvas_h), dynamic_layers, bg_duration) - final_clip = CompositeVideoClip(clips, size=(canvas_w, canvas_h)) - media_resources.append(final_clip) - # Attach the selected cut or full track when available; otherwise render silently. - if audio_bytes or (audio_title and os.path.isfile(audio_path)): + has_audio = bool(audio_bytes or (audio_title and os.path.isfile(audio_path))) + render_duration = bg_duration + if has_audio: audio_clip = AudioFileClip(audio_path) media_resources.append(audio_clip) - audio_duration = min(bg_duration, audio_clip.duration or bg_duration) - final_clip = final_clip.with_audio(audio_clip.subclipped(0, audio_duration)) - final_clip = final_clip.with_duration(audio_duration) - else: - final_clip = final_clip.with_duration(bg_duration) - - # Draft renders keep the 1080x1920 layout and scale only at encode time. - encode_options = {} - if codec == 'libx264': - encode_options['preset'] = _x264_preset() - if data.get('draft') is True: - encode_options['ffmpeg_params'] = ['-vf', 'scale=720:1280:flags=bicubic'] - final_clip.write_videofile( - output_path, - codec=codec, - audio_codec="aac", - fps=30, - threads=_render_threads(), - logger=render_progress.logger(), - **encode_options, - ) + render_duration = min(bg_duration, audio_clip.duration or bg_duration) + + # Prefer the native Rust compositor when available; fall back to MoviePy locally. + used_rust = False + # ======== RUST ENGINE INJECTION ============= + try: + import automap_rs + + def _to_rgba_bytes(arr: np.ndarray) -> bytes: + # Ensure 4-channel RGBA layout before passing raw bytes to Rust. + if arr.shape[2] == 3: + alpha = np.full((arr.shape[0], arr.shape[1], 1), 255, dtype=np.uint8) + arr = np.concatenate([arr, alpha], axis=2) + return arr.tobytes() + + static_rgba = None + dynamic_overlays = [] + veil_duration = 0.0 + + # Skip clips[0] (background_video); Rust decodes it directly from bg_path. + for clip in clips[1:]: + if not hasattr(clip, "img"): + continue + + is_dynamic = id(clip) in dynamic_layers + is_full_canvas = clip.img.shape[:2] == (canvas_h, canvas_w) + + if not is_dynamic and is_full_canvas: + static_rgba = _to_rgba_bytes(clip.img) + elif is_dynamic and is_full_canvas and clip.img.shape[2] == 3: + # Full-canvas 3-channel black clip represents the intro fade veil. + veil_duration = float(clip.duration or 0.0) + elif is_dynamic: + # Resolve MoviePy position ("center" or pixel offset) into top-left (x, y). + pos = clip.pos(0) if callable(getattr(clip, "pos", None)) else getattr(clip, "pos", (0, 0)) + h, w = clip.img.shape[:2] + x = (canvas_w - w) // 2 if pos[0] == "center" else int(pos[0]) + y = (canvas_h - h) // 2 if pos[1] == "center" else int(pos[1]) + dynamic_overlays.append((_to_rgba_bytes(clip.img), x, y, int(w), int(h), 0.0, 0.0)) + + if static_rgba is not None and bg_path: + automap_rs.render_video_rs( + bg_path, + static_rgba, + dynamic_overlays, + veil_duration, + audio_path if has_audio else None, + output_path, + canvas_w, + canvas_h, + 30, + float(render_duration), + codec, + _x264_preset() if codec == 'libx264' else None, + data.get('draft') is True, + ) + used_rust = True + except ImportError: + pass + + if not used_rust: + final_clip = CompositeVideoClip(clips, size=(canvas_w, canvas_h)) + media_resources.append(final_clip) + if has_audio: + final_clip = final_clip.with_audio(audio_clip.subclipped(0, render_duration)) + final_clip = final_clip.with_duration(render_duration) + else: + final_clip = final_clip.with_duration(bg_duration) + + # Draft renders keep the 1080x1920 layout and scale only at encode time. + encode_options = {} + if codec == 'libx264': + encode_options['preset'] = _x264_preset() + if data.get('draft') is True: + encode_options['ffmpeg_params'] = ['-vf', 'scale=720:1280:flags=bicubic'] + final_clip.write_videofile( + output_path, + codec=codec, + audio_codec="aac", + fps=30, + threads=_render_threads(), + logger=render_progress.logger(), + **encode_options, + ) return jsonify({ "status": "success", "file_path": output_path, "download_url": "/api/download_video?" + urlencode({'path': output_path}), - "has_audio": final_clip.audio is not None, + "has_audio": has_audio, }), 200 except Exception as e: