4 ms·
Looks interesting, I wonder if the method of marking functions as 'having side effects' is going to be easy to make fool proof. For instance, I assume that in t
by royjacobs 3y ago
Looks interesting, I wonder if the method of marking functions as 'having side effects' is going to be easy to make fool proof. For instance, I assume that in the example the random number generation is a side effect because it comes from a RNG provided by flawless itself. Would this have worked with a regular Rust function as well?
I assume there is going to be some kind of test harness that allows developers to check their workflows.
- evrimoztamur 3y agoSeeing how both the RNG and the HTTP request are under the flawless namespace, this is going to require you to write 'std::flawless' instead of giving you access to the entire Rust ecosystem. A harness would solve most issues, but I wonder how much of the functionality you can map. So far, this looks more like a scripting runtime which uses Rust.
- bkolobara 3y agoHi! I'm the author of flawless. By using WebAssembly, it's kinda by default fool proof. WebAssemby explicitly requires you to declare host calls inside your modules. If you try to use another host call that is not provided by flawless, your module can't be instantiated. It's also important to notice that there are multiple standardisation efforts going on in the WebAssembly space. For example if you are using the rust `rand` crate and compiling to WebAssembly, it's using the WASI host functions for generating random numbers. While I'm waiting for wasi, wasi-http and others to be standardised, I expose my own interface for now. Obviously, this also has a big downside. You can't compile all Rust code to WebAssembly. However, I prefer this reject by default approach, so that you are guaranteed to never have unintended side effects.
- drakenot 3y agoCould you provide a way to mark function calls as side effects similar to Temporal? I'm a bit worried about the limitation of having to use the flawless namespace functions for everything.
- bkolobara 3y agoFlawless integrates with your existing system. You probably don't need the guarantees that flawless provides for all code, but just specific functions/workflows.
- deleted 3y ago[deleted]