You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
call and call_ret can be unsafe to use if the function takes lifetimes (later changes to the language might address this).
What is a dynamic module?
A dynamic module is loaded at run-time, while running the program, instead of being parsed before running the program. When the module is loaded, you can call functions inside that module through call and call_ret.
Design
When Dyon imports a module X for a new dynamic module A, the module X becomes part of the prelude for A. This makes it easy to:
swap a back-end module without changing the source
rewrite functions in Rust without changing code
write loader scripts that refreshes a module while running the program
replaced need for eval, which might be easily insecure and make a mess
The text was updated successfully, but these errors were encountered:
Dyon uses dynamic modules to organize code.
List of included functions for dynamic modules
fn load(source_file: str) -> res
fn load_source_imports(source_file: str, imports: []) -> res
fn call(module, function_name: str, arguments: [])
fn call_ret(module, function_name: str, arguments: []) ->
call
andcall_ret
can be unsafe to use if the function takes lifetimes (later changes to the language might address this).What is a dynamic module?
A dynamic module is loaded at run-time, while running the program, instead of being parsed before running the program. When the module is loaded, you can call functions inside that module through
call
andcall_ret
.Design
When Dyon imports a module X for a new dynamic module A, the module X becomes part of the prelude for A. This makes it easy to:
eval
, which might be easily insecure and make a messThe text was updated successfully, but these errors were encountered: