Commit graph

715 commits

Author SHA1 Message Date
Admin
cb8ed4c119 zune forgotten thing 2026-06-03 11:19:02 +02:00
Admin
4912f2690d update zune 2026-06-02 18:47:28 +02:00
Kevin Boos
a391f5e347
Overhaul android tooling and platform layers to support Android 8 (#1091)
* Dock: avoid ID collisions in drag/drop; never delete dock root in unsplit_tabs

* Clean up and further harden dock logic around splitting/dragging

* cargo_makepad: Android App Bundle builds, API 26 support, stable toolchain

Overhaul the Android build pipeline. Three related build-tooling
changes that share compile.rs/sdk.rs and so are committed together.

Android App Bundle (.aab) support — required for Google Play uploads:
- New `build-aab` command: compile resources with aapt2, link a
  proto-format APK, assemble the base module, run bundletool, and sign
  with jarsigner.
- New `keystore-create` command wrapping keytool, with a reusable
  keystore sidecar file; new `--keystore*`, `--no-sign`,
  `--version-code`, `--version-name` flags.
- Version codes may be explicit or auto-generated as a monotonic
  YYYYMMDDHH UTC integer.
- Read app id, version, and signing metadata from
  `[package.metadata.packager]` / `[package.metadata.makepad.android]`
  in Cargo.toml; support a custom AndroidManifest.xml template.
- Upgrade the bundled TOML parser for the dotted keys, inline tables,
  and multi-line strings those metadata sections use.
- Download bundletool and copy jarsigner/keytool/aapt2 into the SDK.

minSdkVersion 26:
- Lower the default Android minimum SDK from 33 to 26 and track the
  target SDK (35) separately, emitting minSdkVersion and
  targetSdkVersion independently in the generated manifest; add a
  `--min-sdk-version` override.

Stable Rust toolchain:
- Build Android and iOS on stable instead of nightly. tvOS still needs
  nightly for `-Z build-std`, so the channel is resolved per target.
- Add `ensure_rust_toolchain_installed` (install only when missing).

* Android: load newer NDK symbols at runtime to support API 26

With the minimum SDK lowered to 26, NDK entry points that only exist
on newer API levels can no longer be declared with `extern "C"` —
doing so breaks `dlopen`/startup on API 26-28. Resolve them at
runtime instead:

- amidi_sys: lazily `dlopen` libamidi.so (API 29+) into a cached
  vtable; the wrappers degrade to error/zero returns when the library
  is absent on older devices.
- android_jni: `dlsym` the AChoreographer vsync callbacks, gated on
  the running API level.
- ndk_sys: drop the `extern "C"` declarations for
  `ANativeWindow_setFrameRate` and the Choreographer callbacks;
  android.rs drops the now-unused frame-rate call.
- MakepadActivity: guard `setInitialSurroundingSubText` (API 30+) and
  `layoutInDisplayCutoutMode` (API 28+) behind version checks.
- android_jni: the fallback render-loop thread now exits cleanly when
  the app is torn down.

* Android: automatic and app-controlled system bar appearance

Add a way to control the tint of the status and navigation bar icons,
fixing white-on-white (invisible) icons when an app draws a light
background under a system dark-mode theme.

- New `Cx::set_system_bar_appearance(SystemBarAppearance)`. The default
  `Auto` mode picks dark or light icons from the window background
  luminance; `DarkIcons`/`LightIcons` force the choice.
- The `Window` widget resolves the setting each event cycle — for
  `Auto`, the Rec.709 luma of `pass.clear_color` — and emits
  `CxOsOp::SetSystemBarDarkIcons` only when the resolved value changes.
- On Android this drives `WindowInsetsController.setSystemBarsAppearance`
  (API 30+) or the `SYSTEM_UI_FLAG_LIGHT_*` flags (API 26-29). The tint
  is re-asserted after fullscreen toggles, since the legacy path
  rewrites the whole `systemUiVisibility` bitmask.

* Android: fix soft-keyboard handling and edge-to-edge insets

Several related window-inset and IME fixes, mostly affecting devices
that are not edge-to-edge (Android versions before 15).

- Report safe-area and IME insets as the overlap with the render
  surface, not the raw window-edge insets. On a non-edge-to-edge
  window the surface already sits inside the system bars, so the raw
  insets double-counted — leaving oversized gaps around content and
  above the keyboard.
- Also drive safe-area insets from `onGlobalLayout`, so the app is
  inset correctly from launch instead of drawing under the status bar
  until the first keyboard show or rotation.
- While the keyboard animates, treat the `WindowInsetsAnimation`
  callback as the authoritative per-frame inset source and have the
  layout-driven callbacks defer to it. Read target IME visibility from
  `getRootWindowInsets()` so a show animation is not misread as an
  instant dismissal.
- Only reconfigure the Java IME when the `TextInputConfig` actually
  changes, instead of on every show.
- `KeyboardView`: compute and apply the content shift at keyboard-show
  event time, removing a one-frame lag and a tail-end jump; only
  reconcile post-draw when the focused field actually redrew.
- `Modal::close()`: skip the focus revert when the modal is already
  closed — it was stealing focus from a just-tapped text input and
  causing a first-tap keyboard flicker.
- Hide the keyboard via `WindowInsetsController.hide(ime())` on API 30+.

* platform: don't panic posting actions during shutdown

post_action no longer unwraps the global action sender. It now
silently drops the action if the sender mutex is poisoned, no Cx
sender is installed, or the receiver has been dropped during app
teardown, and only raises the UI signal when the send succeeds.

(Also shortens an over-long field doc comment in cx.rs; no behavior
change.)

* cargo-makepad: link std statically in AAB builds (16 KB page-size fix)

`-C prefer-dynamic` ships std as a separate, 4 KB-aligned libstd.so that
fails Play's 16 KB page-size rule. AAB builds now link std statically;
APK/dev builds keep prefer-dynamic. Also documents {min_sdk_version} in help.
2026-05-22 01:40:29 +02:00
alanpoon
5416cdd25c
Added gif (#1083)
* added giphy

* added gif

* remove unnecessary file changes

* animated_image_git
2026-05-18 22:47:53 +02:00
admin
e76019a9f4 fix slides 2026-05-05 10:00:39 +02:00
admin
5ebbe29850 cad 2026-05-04 18:34:29 +02:00
Admin
77208b237e ai chat working 2026-05-04 08:48:38 +02:00
Admin
61a3f53c5c ai manager otw 2026-04-28 12:24:40 +02:00
Admin
614e203f17 aimgr 2026-04-27 14:51:24 +02:00
Admin
ea993f30c4 Batch Qwen CUDA prefill MoE 2026-04-20 13:48:29 +02:00
Admin
92eee25a4c Optimize Qwen CUDA routing and exact decode 2026-04-20 13:48:29 +02:00
Admin
2325f23dbe Optimize Qwen CUDA MoE decode path 2026-04-20 13:48:29 +02:00
Admin
8049779c0b Checkpoint Qwen CUDA exact progress 2026-04-20 13:48:29 +02:00
Kevin Boos
c7d7202551
Html/Markdown fixes: sub/superscript, table outlines/alignment, etc (#1051)
* draw_text: adopt outer many_instances batch on linux/windows

CodeEditor opens an outer raster batch via DrawText::begin_many_instances
before its glyph loop. The linux/windows branch of DrawText::draw_text
ignored self.many_instances and opened its own nested batch, which
resolved (via find_appendable_drawcall) to the same draw_item whose
`instances` Vec was already swapped out by the outer open, panicking on
unwrap in Cx2d::begin_many_instances.

Mirror what the other platform branch (and draw_rasterized_glyphs_abs)
already do: take self.many_instances on entry, track whether the active
raster batch is the outer one, and hand it back on exit so the caller's
end_many_instances finalizes it. Skip the !drew_raster_this_frame area
clear when the outer batch is still live.

* Html/Markdown fixes: sub/superscript, table outlines/alignment, etc

- **Sub/sup in HTML**: added a `y_shift_scales` stack on `TextFlow`, composed onto `temp_y_shift` in `draw_text`. `<sub>` pushes `+0.55`, `<sup>` pushes `-0.2` in html.rs
- **Sub/sup in Markdown**: now handles `MdEvent::InlineHtml` for `<sub>`/`<sup>` (case-insensitive), using the same stacks.
- **Space after `&amp;` (and other entities)**: the HTML lib's entity decoder now resets `last_non_whitespace` after truncate+push, so the whitespace-collapse check no longer drops the next real space.
- **Table column alignment (Markdown)**: `begin_table_cell` takes `align_x: f64`; tracks `Tag::Table` alignments and a per-row column index, passing each cell's `Alignment` through.
- **Table column alignment (HTML)**: `<td>`/`<th>` now honor `align="…"` and inline `style="text-align: …"` via new `cell_align_x` / `align_keyword_to_x` helpers in html.rs.
- **Per-row text alignment plumbing**: new `layout_align` field on `DrawText` is passed to the layouter, which already supports per-row alignment. `TextFlow` propagates a `cell_text_align_x` into it. This is the actual fix that makes cell alignment visible.
- **Wrap-flow alignment scaffolding**: implemented the previously-stubbed `Flow::Right { wrap: true }` branch in the turtle logic. Useful for non-text wrapping walks; text goes through the layouter path above.
- Add examples to uizoo: three new tables in both markdown and html tab -- a plain one, a left/center/right aligned one, and a numeric all-right-aligned one. They cover bold/italic/code/links/sub-sup/emoji/entities/strikethrough inside cells.

* minor cleanup; prefer `style` over `align` HTML tag
2026-04-18 10:29:50 +02:00
Admin
87863fe42f Add Qwen runtime and Windows CUDA build support 2026-04-17 11:44:43 +02:00
Admin
6c8d210d9d Clean up MLX backend boundary config 2026-04-16 19:07:04 +02:00
Admin
12a0e1b135 Add CUDA multimodal exact path 2026-04-15 21:33:39 +02:00
Admin
4a562a2b51 Fix CUDA chat repeated prompt loop 2026-04-15 21:33:39 +02:00
Admin
eba806b819 Add CUDA exact chat windowing and kernels 2026-04-15 21:33:39 +02:00
Admin
c9ada286a3 cuda otw 2026-04-13 11:09:08 +02:00
Admin
56d948d62f cuda exact chat reuse and decode tuning 2026-04-13 11:09:08 +02:00
Admin
7b81d7ef6b wip cuda long-context profiling 2026-04-13 11:05:49 +02:00
Admin
ceb1e384e8 cuda prefill metrics and chunked kernels 2026-04-13 11:05:49 +02:00
Admin
1ab6e6ed27 cuda exact prefill to ~87 tok/s 2026-04-13 11:05:49 +02:00
Admin
4b801ae74e Add FLUX warm pipeline and reference benchmarks 2026-04-13 11:01:13 +02:00
Admin
dc3baaf69d flux 1 works 2026-04-13 11:01:13 +02:00
Admin
3335c26f27 rotor quant for metal 2026-04-13 11:01:13 +02:00
Admin
93c013707a Document Rotor divergence against BF16 baseline 2026-04-13 11:01:13 +02:00
Admin
cc480e274e Add optional Rotor-style K-cache compression for Gemma 4 2026-04-13 11:01:13 +02:00
alanpoon
985cb4adb6
audio_input_panic_fix for macos (#1038) 2026-04-11 13:52:25 +02:00
Admin
b262f7bac3 Add CUDA NVFP4 backend and GPU decode path 2026-04-11 11:44:04 +02:00
Admin
d7520e837f mlx image opt 2026-04-11 09:51:37 +02:00
Admin
3a90346eaa fix 2026-04-10 21:14:32 +02:00
Admin
5e7955770e mlx multimodal 2026-04-10 15:10:25 +02:00
Admin
b12af23a7a mlx optimisations 2026-04-10 14:48:17 +02:00
Admin
ffc578c243 mlx working 2026-04-10 14:48:17 +02:00
Admin
32612cfe88 cleanup 2026-04-10 14:48:17 +02:00
Admin
c925d2a56b mlx otw 2026-04-10 14:48:17 +02:00
Admin
747ef9b2e8 mlx 5x->2x 2026-04-10 14:46:22 +02:00
Admin
db323ee42e mlx 2026-04-10 14:46:22 +02:00
Admin
fc5d960062 mlx otw 2026-04-10 14:46:22 +02:00
Admin
087952a638 mlx otw 2026-04-10 14:46:22 +02:00
Ruben Daniels
ebe1cab1b7
fix(base64): handle single '=' padding in base64_decode (#1027)
The decoder only checked for double padding ('==') at input[len-2],
subtracting 1 output byte. Single padding ('=') at input[len-1] was
not handled, leaving 1 extra garbage byte in the decoded output.

This affected 2 out of 3 input lengths (any input where len % 3 == 2),
producing decoded output 1 byte longer than expected.

Fix: check input[len-1] for '=' first (subtract 1 byte), then check
input[len-2] for '=' (subtract another byte for double padding).

Added 7 roundtrip tests covering: no padding (3n bytes), single
padding (3n+2 bytes), double padding (3n+1 bytes), empty input,
lengths 1-20, all 256 byte values, and URL-safe alphabet.

Co-authored-by: prime intellect <prime@prime-intellects-Mac-Studio.local>
2026-04-09 20:05:45 +02:00
Admin
3968a4aaba stdin 2026-04-05 11:30:53 +02:00
Admin
0f0ef763d6 llama works 2026-04-05 11:30:53 +02:00
Admin
d8883d1783 llama works atleast 2026-04-05 11:30:53 +02:00
Admin
73544cbf60 churn 2026-04-05 11:28:47 +02:00
Admin
641a158ec5 churn 2026-04-05 11:28:47 +02:00
Admin
c6906d2674 driveable 2026-04-05 11:28:47 +02:00
Admin
a2f032ecc7 drivable 2026-04-05 11:28:47 +02:00