Commit Graph
99 Commits
Author SHA1 Message Date
eeb60f7173 permissions, manganis::ffi, full Info.plist/AndroidManifest.xml customization (#4842)
* initial version

* make custom permission work without const-vec change

* wiring up with cli

* yey symbol found

* wip

* holy moly

* proper ui

* cleanup

* okay

* wip cleanup

* reduce boilerplate code into mobile-core

* Delete copilot-instructions.md

* revert hello-world example for low diff

* fix android build in mobile-core

* rename permission to static_permission

* small success with popup location on android

* android popup working

* Refactor permission checks for readability

Improves code formatting in has_location_permission and check_permission functions by splitting long lines and updating function signatures for better readability. No functional changes were made.

* wip consolidate all java files and build from cli instead of build.rs

* few cli cleanups

* wip java_plugin macro

* cleanup cleanup cleanup

* Update java_plugin macro to use full relative file paths

The java_plugin macro now accepts full relative paths for Java files instead of assuming a fixed directory structure. Documentation and usage examples have been updated to reflect this change, improving flexibility and clarity for specifying file locations.

* Improve iOS geolocation permission and retrieval logic

Added checks for authorization status before requesting location permissions and retrieving location data. Now only requests permission if not determined, and attempts to retrieve cached location before starting location updates, improving efficiency and user experience.

* Add ios_plugin macro for iOS framework metadata

Introduces the ios_plugin! macro in mobile-core-macro for declarative iOS framework metadata embedding. Updates mobile-core to re-export the macro and refactors mobile-geolocation to use ios_plugin! instead of manual linker attributes.

* not needed

* simplify the plugin

* rename mobile-core to platform-bridge and mobile-core-macro to platform-bridge-macro

* Refactor metadata serialization buffer initialization

Replaces inline creation of ConstVec with a named EMPTY constant for buffer initialization in metadata serialization. This improves code clarity and maintainability.

* mobile-geolocation out of dioxus

* take the example also out of dioxus

* remove example from cargo toml

* remove demo css

* revert hello-world example

* revert mac.plist

* revert gitignore

* Remove basic usage example for permissions crate

Deleted the basic_usage.rs example file from the permissions crate. This change may be part of a cleanup or refactoring to remove outdated or unnecessary example code.

* Delete plan.md

* remove dups

* cleanup java build

* cleanup permission symbol extraction

* update todo

* small slop of tested permissions in enums for minimum diff

* Refactor symbol extraction into linker_symbols module

Moved generic symbol extraction logic from android_java.rs and permissions.rs into a new linker_symbols.rs module. Updated both files to use the shared utilities for finding symbol offsets, reducing code duplication and improving maintainability.

* wip consolidate ios and macos as darwin

* Add docs and re-export for MainThreadCell and MainThreadMarker

Expanded documentation for MainThreadCell, clarifying usage and safety. Changed visibility of MainThreadCell to public, improved method docs, and re-exported MainThreadMarker in darwin/mod.rs for easier access.

* Update Darwin framework symbol and section names

Changed the framework symbol prefix from '__DARWIN_FRAMEWORK__' to '__DARWIN_FW__' and updated the Mach-O section name from '__darwin_framework' to '__darwin_fw' for compliance with section name length limits and consistency.

* Fix Info.plist path handling for iOS and macOS

Adds comments and corrects the path to Info.plist for iOS and macOS app bundles. For iOS, Info.plist is at the root of the .app bundle, while for macOS it is inside Contents/. Also improves warning message to include the missing path.

* Handle missing permission symbols and web bundle case

Improves permission extraction by returning an empty manifest when no permission symbols are found or when building a web bundle, as permissions are runtime-only in that case. Adds debug logging for missing symbols and ensures robust handling of these scenarios.

* objc2 over framework

* windows, linux, web all permissions are runtime so cleanup

* only include permissions for build time

* cleanup unnecessary test

* more cleanup

* extract shared into dx-macro-helpers

* rc.3 to 0.7.0 for const-serialize

* Add CustomPermissionBuilder and enhance PermissionBuilder for better permission management

- Introduced `CustomPermissionBuilder` for creating custom permissions with platform-specific identifiers.
- Enhanced `PermissionBuilder` to support custom permissions and location permissions with a clear builder pattern.
- Updated documentation and examples in the macro README to reflect new usage patterns for custom and location permissions.
- Improved parsing logic in the macro to handle both builder and direct construction patterns for permissions.

* clippy fixes

* implement const cbor encoding + decoding for basic types

* Add #[used] attribute to linker sections for optimization protection

- Added #[used] attribute to linker sections in both permission and Android plugin macros to prevent the linker from optimizing away symbols, ensuring they are preserved even if unused.
- Created static references to linker sections to enhance defense-in-depth against optimization issues.

* implement map encoding and decoding

* fix map test

* wip unified linker symbol

* cleanup permissions

* pipe java sources with manganis as well

* all tests passing

* dynamically sized arrays

* smaller str encoding

* swap array and list and add more documentation

* move serialization and deserialization for each struct together

* support both legacy and new assets

* bump const serialize version

* fix asset conversion code

* pull out manganis symbol struct from tuble

* test reading old asset versions

* more list/array cleanup and bump rust version

* fix clippy

* Revert "pipe java sources with manganis as well"

This reverts commit ddea9a459d9ac26f3f037a74d9ae0de3edfced67.

* Revert "cleanup permissions"

This reverts commit 7b18500155237403e179f0783cb8903a4f158b80.

* Revert "wip unified linker symbol"

This reverts commit 813e33feddb30d26868f6ac6e6da318402ac138f.

* Revert "Add #[used] attribute to linker sections for optimization protection"

This reverts commit a94a7a3a5e8eee80060de9d66a53aabfcf554f96.

* update cargo lock

* wip permission through assets

* abit cleanup

* fix reexports

* fix assets

* Fix the permissions piping

* some small cleanups

* checkout const-serialize as per #4932 and fix build

* invoking swift as a package

* geolocation package & example dumping for easy testing

* keep geolocation simple for testing

* cleanups

* pipe everything through __ASSETS__ and cleanup

* remove linker_symbols helper file

* example

* re example

* copy build methos into mobile-plugin-build crate

* Add conditional import for dioxus_07 feature

Introduces a conditional import to use the dioxus_07 crate when the corresponding feature is enabled, improving compatibility with different dioxus versions.

* Improve error handling and JNI reference usage

Adds a null check for Objective-C instance initialization in the iOS geolocation plugin to prevent errors on failed allocation. Refactors Android callback to use local JNI references instead of creating unnecessary global references, reducing potential memory leaks.

* revert changes on playwright

* Update dioxus dependency to 0.7.2 in Cargo.lock

Removed dioxus 0.7.1 from dependencies, retaining only dioxus 0.7.2 for the dioxus-cli-optimization-test package.

* small cleanup

* Add legacy const-serialize 0.7 support to dx-macro-helpers

Introduces support for the const-serialize 0.7 format in dx-macro-helpers by adding a new dependency and export, as well as a helper function for serialization with layout padding. Updates manganis to use the new helper for serializing assets in the legacy format, simplifying code and improving maintainability.

* Add helper for legacy and current linker sections

Introduces generate_link_sections_with_legacy in dx-macro-helpers to emit both legacy and current linker sections for compatibility. Refactors manganis-macro to use this new helper, reducing duplication and improving maintainability.

* Fix lints

* Fix clippy and doctest

* Refactor asset bundling and allow large enum variant

Refactored Asset::bundled to use Vec<u8> instead of ConstVec for reading volatile slices, simplifying the code and improving compatibility. Added #[allow(clippy::large_enum_variant)] to SymbolData enum to suppress Clippy warnings about large enum variants.

* Update license URLs in README to use angle brackets

Changed license URLs in the README from parentheses to angle brackets for improved formatting and clarity.

* Fix asset deserialization with correct buffer type

Replaces the use of `bytes.read()` with `ConstReadBuffer::new(bytes.as_ref())` for asset deserialization, ensuring compatibility with the expected deserialization API.

* Refactor geolocation and asset handling for clarity

Removed unnecessary clones in geolocation example event handlers to simplify state management. Updated SymbolDataOrAsset to store SymbolData in a Box for improved memory handling and adjusted related logic. Fixed documentation example in geolocation lib to include PermissionState in the import.

* Update geolocation example and permissions usage docs

Removes unused variables in the geolocation example's App function. Updates the permissions crate documentation to reflect new API usage with PermissionBuilder and LocationPrecision.

* Update permissions-macro to use permissions crate

Switched imports and dev-dependency from permissions_core to permissions in permissions-macro. Updated documentation and examples to reflect the new crate usage.

* rollback const-serialize changes

* move items around (doesn't compile)

* convert gelocation plugin to example

* remove dx-macro-helpers

* we're just gonna full-send linker everything

* rollback desktop changes

* remove gradle

* fix most compile?

* fix dioxus vers

* small cleanups

* add claude design docs

* add ffi macro

* remove

* loads but not linking yet

* fix output leak

* a little bit closer but not quite

* improve android code gen

* sheeeeee works!!!

* small tweaks to demo

* replace ios/android plugin with ffi macro entirely

* simplify ffi module

* simplify again

* condense / rip out some stuff from manganis

* remove types form public api

* wip, permissions

* oops I broke it

* I unbroke it

* move arch doc

* remove extra manifest types

* drop bindgen file

* remove permission

* small cleanup

* remove unsafecall mtm thing

* yoink perms

* wire up manifest

* Add deeplinks

* add schema generation

* update schema

* wip....

* fix recurse limit schema generation

* wip, muck around with schema

* add inline dioxus.toml support

* merge bundle config schemas

* claude my man

* Remove cdecl, annotate ffi

* rename design docs

* wip: live activities

* wip: apple plugin bundling

* wip

* get live activities linking properly

* small cleanups

* remove sidecars

* remove widget

* yoink legacy

* cleanup

* more fixups

* wire up more things to dioxus.toml

* fix workspace join

* final cleanups

* fmt

* final bit of clippy

* ci tweak

* update schema

* fmt, doc

* update schema docs

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2026-02-13 15:39:38 -08:00
Antti Jalomäki 4070d0c8bd docs: fix grammar and typos in comments and documentation (#5254)
* docs: fix grammar and typos in comments and documentation

* docs: use British English style for e.g. and i.e. (no trailing comma)
Changed from American English style (e.g.,) to British English style (e.g.)
for consistency with the rest of the codebase."
2026-01-23 13:30:00 -08:00
Jonathan Kelley ec8f31dece bump translation links 2025-12-29 22:58:12 -05:00
Jonathan Kelley 852a1e5ea5 move notes to translations 2025-12-29 20:23:55 -05:00
Jonathan Kelley e2a405457f move security doc to notes 2025-12-29 20:23:10 -05:00
Jonathan Kelley 638c02e15a feat: AGENTS.md and architecture guides for agents! 2025-12-29 18:09:05 -05:00
Jonathan Kelley 8b482f4252 update README.md with new gif 2025-10-03 20:30:02 -07:00
Jonathan Kelley b0b23f183d cache bust 2025-08-20 11:50:41 -07:00
Jonathan Kelley 230a2b7faa qualify ebou 2025-08-20 11:50:00 -07:00
Jonathan Kelley 5852a3bc69 add section about beautiful apps 2025-08-20 11:48:03 -07:00
Jonathan Kelley 727752a965 final 0.7 fixes: xcode 15/16 hybrid, auto openssldir for android, include_*! tracking hotpatch, fix /assets/ brick at high opt levels, windows linker file, etc (#4376)
* wip: openssl autodetection

* add voltaile read inside of asset fn

* support xcode 15 for --device

* vendor openssl on android

* Smaller width TUI

* switch to anyhow for the entire CLI

* add backtrace and print double printing of cargo_metadata errors

* add some padding to multi-line anyhow error

* check semvers

* don't open if not interactive

* set the tailwind current_dir so it doesn't twitch

* get the oboe demo working

* copy the c++ library on android

* cleanup env vars

* add depinfo watcher

* fix stale hotpatches and crate count

* add musl support

* remove outdated autofmt test

* update scanner app

* add hotdog app and bundle to ci

* upload dx on every branch

* collapse mobile into desktop

* `dx doctor` command

* windows command files

* no pipe on doctor

* fix ci?

* fix links

* fix ci

* use main instead of nightly

* bump node

* build cli for host

* cargo doc

* prep dog_app for bundle

* package hotdog

* no bundle or nightly cli

* comment out nightly cli

* add quotes to linker files
2025-07-14 12:54:15 -07:00
Jonathan Kelley bc593ba4ef update readme with some new features for 0.7 2025-06-25 13:26:53 -07:00
Jonathan Kelley 929cab9ecf fix more links 2025-05-24 22:52:42 +01:00
Jonathan Kelley cd07d05ed0 fix links 2025-05-24 22:51:47 +01:00
Jonathan Kelley 03dfacc61b fill out release notes a bit more 2025-05-14 10:24:42 +02:00
Jonathan Kelley 166ad41453 add wip alpha release notes 2025-05-14 10:22:43 +02:00
Jonathan Kelley 8b553063ea Add a guide for releasing Dioxus (#3384)
* add a release guide

* Add note about conferring with community

* Add link to cargo-workspaces

* Add note about why we use cargo-workspaces

* extra note about building docs

* add note about docs.rs not building

* add note about backports

* add note about updating docsite

* more notes
2024-12-17 18:12:37 -08:00
Jonathan Kelley 66a50240bc Update all docs links to 0.6, release 0.6 (#3225)
* update doc links to 0.6
* add new splash pages for crates
* update keyword features
* remove some unnecessary links
2024-12-06 19:15:15 -08:00
Jonathan Kelley 9888d365dd New readme for 0.5! (#2141)
* feature: add new top-level readme.md, highlighting features and a new vs section
2024-03-26 17:32:42 -07:00
Jonathan Kelley 5dd33c9dcd Remove outdated docs 2024-02-15 14:31:32 -08:00
Jeremy Chen 9e4f3456c0 docs: move Chinese README to translate directory and update some translate issues. 2024-01-21 00:44:18 +08:00
Yolo 882c3c9dfb Update ZH_CN.md to use 0.4 version of guide (#1388)
* fix: readme awesome link

* Update ZH_CN.md to use 0.4 version of guide
2023-08-22 10:39:22 -05:00
Ikko Eltociear Ashimine c6ec2a9a9b docs: add Japanese README (#1329)
* Add Japanese README

* Add links

* minor fix
2023-08-09 11:20:19 -05:00
Yolo 51b62dd33a fix: readme awesome link (#1320) 2023-08-08 12:57:57 -05:00
Jonathan Kelley 16763c065b Rename dioxus to dx in examples and fullstack 2023-07-14 13:53:06 -07:00
Azriel Hoh 4611df014e Add notes to CONTRIBUTING.md. 2023-05-29 13:13:55 +12:00
Evan Almloff 3f3db39c28 update doc links 2023-01-15 15:18:12 -06:00
Jonathan Kelley a0961583d1 fix: versions and readme 2023-01-04 14:58:06 -05:00
Jonathan Kelley 6dc9da3398 chore: remove old file 2022-12-29 16:20:20 -05:00
Jonathan Kelley 4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2022-12-07 13:11:40 -08:00
YuKun Liu 250d138bf6 Update ZH_CN.md 2022-12-01 09:06:53 -08:00
YuKun Liu afc40d9bf7 Update ZH_CN.md 2022-11-30 11:39:13 -08:00
Jon Kelley 4f1cf78e68 design: make the homepage snazzier (#580)
* feat: snazzy header

* feat: better svg

* fix: optimize svg for safari

* feat: prettier homepage
2022-10-07 01:00:32 -07:00
Jon Kelley 28fba42e7e feat: add an unhygenic render macro (#556)
* feat: add an unhygenic render macro

* chore: use render instead of rsx!(cx,
2022-09-25 01:05:16 -07:00
0c421f6e8c Document formatting and typo fixes (#495)
* minor formatting

* Internationalization: move guide to en folder and preserve its history. (#494)

* chore: move guide to en folder

* docs: add english as language

* merged conf resolved

* chore: remove outdated docs

* chore: use taffy dimension directly

* Add PT-BR translations (#456)

* Translate final.md, hello_world.md, README.md, ROADMAP.md and SUMMARY.md

* Translatation complete

* Internationalization: move guide to en folder and preserve its history. (#494)

* Clean files and build mdBook with localization feature

* Rebase, remove leftovers and check book builds for every language: ✅

Co-authored-by: Jon Kelley <jkelleyrtp@gmail.com>

* Remove argument from `use_hook` closure (#496)

Also; update docs for said function

* chore: prevent reference from being uploaded

Co-authored-by: Altug Sahin <altugsahin@gmail.com>
Co-authored-by: Jon Kelley <jkelleyrtp@gmail.com>
Co-authored-by: Breno Rocha <66398400+amindWalker@users.noreply.github.com>
Co-authored-by: Reinis Mazeiks <rMazeiks@users.noreply.github.com>
Co-authored-by: = <evanalmloff@gmail.com>
2022-09-05 13:58:19 -05:00
Jon Kelley d9546d9504 Renderers are now packages, not features. (#387)
* feat: use synchronous router design

* feat: function to get router out of dom

* chore: restructure workspace to use renderers as packages, not features
2022-07-09 15:15:20 -04:00
YuKun Liu 9d285d842d Update ZH_CN.md 2022-04-17 11:59:29 +08:00
YuKun Liu 9c0963abe7 Update ZH_CN.md 2022-04-17 11:56:30 +08:00
Jonathan Kelley 55773bf106 fix: links 2022-03-05 16:09:49 -05:00
Jonathan Kelley eaeda6e201 docs: refactor our readme for main crate 2022-03-02 23:05:57 -05:00
j1ngzoue abbd0b8a39 fix: update the sample 2022-02-08 10:25:25 +09:00
YuKun Liu c5fe8afe46 link docs to chinese version 2022-02-05 08:52:40 +08:00
YuKun Liu a270ccd81e trans Projects in the ecosystem 2022-02-05 08:50:15 +08:00
Jonathan Kelley 71371d570a docs: change discord readme badge 2022-01-25 13:17:43 -05:00
YuKun Liu 27bdef3040 Update ZH_CN.md 2022-01-17 23:47:38 +08:00
YuKun Liu 5badcd830c Update ZH_CN.md 2022-01-17 23:44:16 +08:00
YuKun Liu 7dd7944487 Update ZH_CN.md 2022-01-14 09:56:46 +08:00
YuKun Liu 55b84fd9bd docs: commit docs 2022-01-13 12:30:05 +08:00
YuKun Liu aa15d00b1e docs: add zh-cn readme 2022-01-13 12:16:17 +08:00
Jonathan Kelley d1560450ba wip: remove runner on hook and then update docs 2022-01-02 02:15:04 -05:00