Skip to content

Files

Latest commit

 

History

History

examples

relib examples

Use cargo run to compile host, module crates and run host binary.

note: you can also run it without --features unloading (see "Usage without unloading").

Automatically reload module on code changes.

Use cargo run in live_reload directory and then change something in live_reload/module/src.

Use cargo run to compile host, module crates and run host binary.

note: you can also run it without --features unloading (see "Usage without unloading").

This example shows how you can make your own export macro for main function which will validate input code.

  • Try to change main function of module, add arguments or change return type.
  • Try to build the module using cargo build --workspace in export_main_macro directory

How to run:
cargo build --features unloading (in examples/custom_global_alloc directory)
cargo run --bin basic_host --features unloading <path> (in repo root)

replace <path> with examples/custom_global_alloc/target/debug/libcustom_global_alloc.so on linux and examples/custom_global_alloc/target/debug/custom_global_alloc.dll on windows

note: you can also build it without --features unloading (see "Usage without unloading").