Calling into a Chez Scheme library -- imported symbol rewritten in vm-eval?

18 views
Skip to first unread message

Andrew Wilcox

unread,
Aug 27, 2023, 8:06:31 PM8/27/23
to Racket Users
I have a Chez Scheme library "foo.ss":

(library (foo)
   (export bar)
   (import (rnrs))

   (define (bar) "hello"))


From Chez Scheme:

$ chezscheme
Chez Scheme Version 9.5.4
Copyright 1984-2020 Cisco Systems, Inc.

> (eval '((lambda () (import (foo)) (bar))))
"hello
"


A Racket program "call.rkt" which attempts to use the library:

#lang racket

(require ffi/unsafe/vm)

(vm-eval
 '((lambda () (import (foo)) (bar))))


$ racket call.rkt
variable bar554 is not bound
  context...:
   body of "/home/andrew/prj/audit/compile/call.rkt"


What would be the right way to do this?

Thank you,

Andrew

Reply all
Reply to author
Forward
0 new messages