unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Brad Medeiros <bradmedeiros0@gmail.com>
To: guile-devel@gnu.org
Subject: How to "sandbox" scripts
Date: Thu, 16 Apr 2020 23:27:51 -0700	[thread overview]
Message-ID: <CAMnXraS1-ft7wa-fc-TNnOXQFVFUyztG7zHh+jeVf3nx3Zh9Kg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]

Hi All - I haven't been active on these mailing lists, but I've been
reading them for a bit of time now.   Nice to actually reach out!

I am building a simple game engine and I'm embedding guile in it to do game
scripting.
One property I want is the ability to write scripts where each defines a
function - eg onFrame, onMouseMove, and so on, and then call these.

Currently I do this via calling scm_c_primitive_load to actually run the
initial evaluation and then I call back into hooks -
scm_call_0(scm_c_lookup("onFrame"));  So far it has been working great.

What I would like to do, is to be able to load multiple scripts that define
the same set of functions, and then iterate over them calling each's
onFrame.   Ideally these should be sandboxed as much as possible.

Any ideas of how to do this?

[-- Attachment #2: Type: text/html, Size: 934 bytes --]

                 reply	other threads:[~2020-04-17  6:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMnXraS1-ft7wa-fc-TNnOXQFVFUyztG7zHh+jeVf3nx3Zh9Kg@mail.gmail.com \
    --to=bradmedeiros0@gmail.com \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).