-
Notifications
You must be signed in to change notification settings - Fork 6
spike: utils #119
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
base: main
Are you sure you want to change the base?
spike: utils #119
Conversation
Had to work around this bug in maturin: PyO3/maturin#2459 This fix is relatively simple but requires you to modify the packages post-installation. A fix (more like feature) can be added to maturin and I think it should be fairly straightforward
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.
It be great to also capture the spike (once its finalized) as an architecture diagram or a md document that highlights all user facing utils interfaces (based on current py vs ts interfaces that maintain feature parity) and lists down their public user facing methods/functions, as well as which of those would be exposed via ffi vs which would only have a stub and would have to be implemented manually in binding packages in target languages (referring to packages in packages folder).
} | ||
|
||
#[derive(uniffi::Object)] | ||
pub struct Composer { |
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.
Would the idea be to expose all main high level utils abstractions but excluding any user facing methods that would interact with API clients or any excessively stateful logic (deferring the implementation to the target language ffi binding package)? For example how would we implement send
method on a TransactionComposer
- i presume it will be possible to handle it completely on rust side but we can't expose it via ffi (given extra fact that api clients will exist natively per each target language) but is there a way to expose some sort of abstract stub that can then be implemented in target package (py/ts/...) by ourselves manually?
There is something weird going on with the env package though. For now you need to bun rm env, run the build script, and then bun i env before running the tests
Mutex works in WASM and only adds a few nanos of overhead, so just easier to use Mutex for both uniffi and wasm
It works, but there seems to be some closure that isn't getting cleaned up properly in the async call
Bun prefers main over module for some reason at runtime. See oven-sh/bun#13430 (comment)
Spike to see what a rust-based utils would be like. Focusing on Python and TS.
See this comment to see how to get it working: PyO3/maturin#2459 (comment)