aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lib.rs
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-12-05 00:55:50 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-12-05 00:55:50 +0100
commit4a80838151a9945438739ab937c415939e2ccf5b (patch)
tree6e3fe2a355c2703e1a1401a88c3ee1ebcbb1819a /src/lib.rs
parent474c2545cbb1af85a326a47e202fe1e6c450b496 (diff)
downloadjuicebox-asm-4a80838151a9945438739ab937c415939e2ccf5b.tar.gz
juicebox-asm-4a80838151a9945438739ab937c415939e2ccf5b.zip
rt: extend runtime to allow adding multiple code blocks
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 2 insertions, 2 deletions
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::<extern "C" fn(u64) -> u64>() };
+//! let mut rt = Runtime::new();
+//! let fib = unsafe { rt.add_code::<extern "C" fn(u64) -> u64>(&asm.into_code()) };
//!
//! for n in 0..15 {
//! let fib_jit = fib(n);