Well, a full effect system might not be necessary "just" for safe plugins.

Since we have a way in Rust to indicate which version a "plugin" we want to
link to, we could apply some restrictions there.

For example, specifying that only a certain list of other libraries can be
used by this "plugin" (and typically none with IO features) and that it
cannot use unsafe code would guarantee some sandboxing already. Similarly,
the GC restriction could be placed there.

-- Matthieu


On Wed, Apr 3, 2013 at 5:26 PM, Dean Thompson <deansherthomp...@gmail.com>wrote:

> The Rust team refers to this as an "effect system".  They originally had
> one, but that one proved unworkable and was deleted.  They continue to
> regard it as desirable but difficult to get right, and as a potential
> future.  Here's some 
> history<http://irclog.gr/#search/irc.mozilla.org/rust/%22effect%20system%22>.
> They would certainly welcome serious proposals or demos, although almost
> certainly continuing to hold it out for post-1.0. They would think in terms
> of first researching the most successful effect systems in other languages.
>
> Dean
>
> From: Grant Husbands <rust-...@grant.x43.net>
> Date: Wednesday, April 3, 2013 5:14 AM
> To: <rust-dev@mozilla.org>
> Subject: [rust-dev] Library Safety
>
> I've been following the Rust story with some interest and I'm excited
> about the opportunities Rust brings for sandbox-free, secure system
> software. However, there are some things that it lacks, that would
> otherwise make it the obvious choice.
>
> One that I feel is important that has been touched upon by others is
> having static assurances about code, especially imported libraries. If I
> use a jpg library, I want to be sure that it isn't going to do be able to
> do any unsafe operations, use GC or access the file-system or the network.
> That way, I don't have to trust the code and can instead be assured that it
> simply cannot perform any dangerous actions.
>
> Currently, to do that, I have to inspect the whole library. As a developer
> without the time to do that, I'd much prefer for the import to be annotated
> to indicate such things (or, ideally, to be annotated to indicate the
> allowed dangers).
>
> This could be seen, of course, as a precursor to capabilities - reducing
> ambient authority is a key first step in getting a capability-secure system
> - but it's also a simple way of getting assurances about code without
> having to inspect it.
>
> Does it seem like a reasonable thing to add? I may be able to find time to
> work on it, should it be acceptable.
>
> Regards,
> Grant Husbands.
> _______________________________________________ Rust-dev mailing list
> Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to