wasm accessing system config and other wasm apis #2054
amitu
started this conversation in
Ideas & RFCs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If a system eg
lets-talk-system
is configured vialets-talk
system alias thing, it can define data eglets-talk.dashboard-url
, and wasm can access this via callingft-sdk::system_var("lets-talk.dashboard-url") -> Result<serde_json::Value, SystemVarError>
.The request will be sent to host, and host will evaluate the FASTN.ftd, find the
lets-talk
alias and its correspondingprovided-via
, evaluate that document and extract thevariable-name
out of it.App SDKs
Every app has to has a system, for storing configuration and if any app wants to access configuration of any other app it should import that app's sdk crate, which gives a type safe wrapper over
ft-sdk::system_var
.These SDKs will be very minimal, only type definitions etc.
App SDKs can also wrap HTTP calls for APIs defined in by that app, eg auth app can expose login/create account etc APIs, and any app can call those APIs using the SDK, which will internally make one wasm call another wasm with type safe API.
Beta Was this translation helpful? Give feedback.
All reactions