Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Implement basic FFI bindings for Jason API #194

Merged
merged 18 commits into from
Apr 20, 2021
Merged

Conversation

alexlapa
Copy link
Collaborator

@alexlapa alexlapa commented Apr 20, 2021

Part of #182

Synopsis

Начинаем создавать Дартовские обертки для обьектов внешнего интерфейса Jason'а и FFI уровень в dummy-jason.

Checklist

  • Created PR:
    • In draft mode
    • Name contains Draft: prefix
    • Name contains issue reference
    • Has k:: labels applied
    • Has assignee
  • Documentation is updated (if required)
  • Tests are updated (if required)
  • Changes conform code style
  • CHANGELOG entry is added (if required)
  • FCM (final commit message) is posted
    • and approved
  • Review is completed and changes are approved
  • Before merge:
    • Milestone is set
    • PR's name and description are correct and up-to-date
    • Draft: prefix is removed
    • All temporary labels are removed

evdokimovs and others added 16 commits March 25, 2021 12:09
# Conflicts:
#	.github/workflows/ci.yml
#	Makefile
#	jason/flutter/.gitignore
#	jason/flutter/README.md
#	jason/flutter/android/.gitignore
#	jason/flutter/android/build.gradle
#	jason/flutter/android/gradle.properties
#	jason/flutter/android/src/main/AndroidManifest.xml
#	jason/flutter/example/.gitignore
#	jason/flutter/example/android/.gitignore
#	jason/flutter/example/android/app/build.gradle
#	jason/flutter/example/android/app/src/debug/AndroidManifest.xml
#	jason/flutter/example/android/app/src/main/AndroidManifest.xml
#	jason/flutter/example/android/app/src/main/res/drawable-v21/launch_background.xml
#	jason/flutter/example/android/app/src/main/res/drawable/launch_background.xml
#	jason/flutter/example/android/app/src/main/res/values-night/styles.xml
#	jason/flutter/example/android/app/src/main/res/values/styles.xml
#	jason/flutter/example/android/app/src/profile/AndroidManifest.xml
#	jason/flutter/example/android/build.gradle
#	jason/flutter/example/android/gradle.properties
#	jason/flutter/example/android/settings.gradle
#	jason/flutter/example/integration_test/jason.dart
#	jason/flutter/example/lib/main.dart
#	jason/flutter/example/pubspec.yaml
#	jason/flutter/lib/jason.dart
#	jason/flutter/pubspec.yaml
#	jason/jason-dummy/Cargo.toml
#	jason/jason-dummy/src/lib.rs
@alexlapa alexlapa added feature New feature or request k::api Related to API (application interface) platform::android Specific to Android platform labels Apr 20, 2021
@alexlapa alexlapa added this to the 0.3.0 milestone Apr 20, 2021
@alexlapa alexlapa self-assigned this Apr 20, 2021
@alexlapa alexlapa changed the title Implement basic FFI bindings for Jason API Draft: Implement basic FFI bindings for Jason API Apr 20, 2021
@alexlapa
Copy link
Collaborator Author

alexlapa commented Apr 20, 2021

FCM:

Implement basic Dart FFI bindings for Jason API (#194, #182)

@alexlapa
Copy link
Collaborator Author

К ревью:

  1. Нулл-чекать пойнтеры в расте, по сути, смысла нет, им там браться неоткуда. Задача по гарантии отсутствия use-after-free лежит на дарте.
  2. Сейчас подразумевается что на дартовских обьтектах надо дергать функцию free, которая дропнет соответствующую стркутуру в расте. Потом еще планирую прикрутить finalizer'ы
  3. Закомменченые куски кода - не мусор, а заметки для следующих задач.
  4. Запилил маркер-аннотацию @moveSemantics чтобы в дарте было виднее в каких случаях раст будет мувать структуру под пойнтером.
  5. Текущие тесты корявые и будут заменены когда настоящий Jason прикрутим.

Ну и в принципе этот PR является work in progress. Некоторые моменты могут быть пересмотрены, доку пока писать смысла нет.

@alexlapa alexlapa marked this pull request as ready for review April 20, 2021 15:02
@alexlapa alexlapa requested a review from tyranron April 20, 2021 15:02
Copy link
Member

@tyranron tyranron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexlapa I think in next PRs we should move stuff to medea-jason crate instead of jason-dummy, and cooking stuff right there. With documention, inlining and other conventions.

@tyranron tyranron added the k::design Related to overall design and/or architecture label Apr 20, 2021
@tyranron tyranron changed the title Draft: Implement basic FFI bindings for Jason API Implement basic FFI bindings for Jason API Apr 20, 2021
@alexlapa alexlapa merged commit 44e5aaf into master Apr 20, 2021
@alexlapa alexlapa deleted the jason-api-flutter branch April 20, 2021 15:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or request k::api Related to API (application interface) k::design Related to overall design and/or architecture platform::android Specific to Android platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants