-
Notifications
You must be signed in to change notification settings - Fork 4
DIGIT-2257 Implement web platform channel #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DIGIT-2257 Implement web platform channel #28
Conversation
…aring them directly
|
In order to test this Pull Request as a whole, it requires the approval and merge of this one, which finaizes the implementation of |
niltonvasques
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you review the pr files? Seems that compiled files are committed here
…/native delegation
…ancing approach throughout the codebase.
…e ´path´ dependencies" This reverts commit af143a9.
…ng this analyze warning in `analysis_potions.yaml`
848fc6c to
5e64fe5
Compare
|
All things done 👍 |
… disabling this analyze warning in `analysis_potions.yaml`" This reverts commit 5e64fe5.
Add a single pre step to back up and append publish_to: none across all packages, remove duplicated snippets from analyze steps, and add an always() post step to restore backups. Keeps dependency_overrides for parsec intact while eliminating boilerplate.
parsec_web/README.md
Outdated
| @@ -0,0 +1,69 @@ | |||
| # parsec_web | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still complex, instead add the details here, move them to the main parsec flutter readme. Because on the end the users will install the main lib, instead the child libs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I though each one of them were meant to be working independently although parsec runs with all of them together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
… will be discarded, so it's not necessary to make a working version)
|
@niltonvasques done |
niltonvasques
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats man! 🚀
|
Thank tou, @niltonvasques ! @rodiguif , now the PR is merged! |
Summary
This PR introduces full Web platform support for the Parsec Flutter plugin using WebAssembly (WASM) compiled from the same C++ equations-parser library used by native platforms. This ensures true cross-platform consistency and high performance for mathematical equation evaluation in web browsers.
Architecture Pattern
graph TD A[Parsec Plugin] --> B[ParsecPlatform Interface] B --> C[parsec_android - JNI/C++] B --> D[parsec_linux - FFI/C++] B --> E[parsec_windows - FFI/C++] B --> F[parsec_web - WASM/JS] F --> G[equations-parser.wasm] C --> H[equations-parser C++] D --> H E --> H G --> HOverview
Key Features Added
dart bin/generate.dart🏗️ New Package:
parsec_webParsecPlatforminterface for Web via WebAssemblydart bin/generate.dartcommand for WASM compilation🔧 Core Plugin Updates (
parsec/)pubspec.yamlParsecclass for async/await consistency🧪 Testing Infrastructure
📚 Documentation Enhancements
⚙️ CI/CD Improvements
web_tests.yml: Dedicated Web testing workflowWebAssembly Workflow
packages/parsec_web/parsec-web/Test Guidance
Prerequisites for Testing
cd parsec_web dart bin/generate.dart🧪 Step-by-Step Testing Process
1. Verify WASM Generation
2. Run Cross-Platform Tests
3. Validate JavaScript Integration
4. Manual Testing - Web Example
5. Manual Testing - Native Comparison
6. Performance Validation
7. Error Handling Verification
Test these error cases across all platforms:
"2 + + 3"→ Should throw ParsecEvalException"1/0"→ Should handle gracefully"unknownfunc(1)"→ Should provide clear error🔍 Expected Behavior Validation
Cross-Platform Consistency Test
Web-Specific Features
If tests fail, check:
cd parsec_web && dart bin/generate.dart🎯 Success Criteria
dart bin/generate.dartflutter run -d chromeThis implementation brings the Parsec Flutter plugin to feature parity across all supported platforms while maintaining the high performance and reliability expected from the native C++ equations-parser library.