1cb1847aa6
There are a few tricky details to call out here. The first is the `TransactableValueMarker` trait. This is strictly a marker (like `Sized`, for example) to give some control over what types can be used as value types in `Entity` instances. This expression is needed due to the network of `Into` and `From` relations between the parts of valid `Entity` instances. This allows to drop the `IntoThing` work-around trait and use the established patterns. (Observe that `KnownEntid` makes this a little harder, due to the cross-crate consistency restrictions.) The second is that we can get rid `{add,retract}_kw`, since the network of relations expresses the coercions directly. The third is that this commit doesn't change the name `TermBuilder`, even though it is now building `Entity` instances. This is because there's _already_ an `EntityBuilder` which fixes the `EntityPlace`. It's not clear whether the existing entity building interface should be removed or whether both should be renamed. That can be follow-up. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
Development flow for Mentat FFI
Android SDK
Android Mentat SDK is one of two first-party consumers (the other one being iOS Mentat SDK).
Binaries produced by cargo build ...
are symlinked from within the SDK, and a number of target-specific libmentat_ffi.so
binaries are bundled together and distributed with the SDK.
There is a build script at <mentat_root>/scripts/android_build.sh
which knows how to cross-compile mentat_ffi
for various Android targets.
./<mentat_root>/scripts/android_build.sh
- compiles for all supported targets./<mentat_root>/scripts/android_build.sh x86
- compiles forx86
./<mentat_root>/scripts/android_build.sh x86 arm
- compiles forx86
,arm
General development flow while working on the Android SDK is:
- (pre) compile for all targets, if you've never done so
- make changes to
mentat_ffi
and/ormentat
- re-compile
mentat_ffi
binaries using./android_build.sh x86
. During development it's faster to compile just for the target which matches your emulator, e.g.x86
- make corresponding changes in the Android SDK, try them out from within the bundled sample project
- since binaries are symlinked, no manual copy step is necessary for the Android SDK to pick up the changes
iOS SDK
TODO, contribute via issue #732.