From 4a80838151a9945438739ab937c415939e2ccf5b Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Tue, 5 Dec 2023 00:55:50 +0100 Subject: rt: extend runtime to allow adding multiple code blocks --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index de12c57..0cc86fb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -61,8 +61,8 @@ //! asm.ret(); //! //! // Move code into executable page and get function pointer to it. -//! let rt = Runtime::new(&asm.into_code()); -//! let fib = unsafe { rt.as_fn:: u64>() }; +//! let mut rt = Runtime::new(); +//! let fib = unsafe { rt.add_code:: u64>(&asm.into_code()) }; //! //! for n in 0..15 { //! let fib_jit = fib(n); -- cgit v1.2.3