Pharo 项目发布了名为 "Pharo in the Browser" 的技术文档,介绍如何利用 WebAssembly 和 JavaScript 在浏览器中直接运行 Pharo 编程语言 1。该方案支持加载多种文件格式,包括 Smalltalk .st 文件、Pharo .zip 压缩包,以及包含 .changes 和 .sources 文件的 .image 镜像文件 1。
在网络交互与安全机制方面,若需执行 Iceberg 的 https:// 克隆操作或 Metacello 的 github:// 加载任务,系统要求通过 CORS 代理进行中转,例如访问 github.com/pharo-project/pharo.git 等仓库地址 1。用户可根据需求选择凭证处理模式:“My proxy” 仅经代理传输,“None” 尝试直连主机(此模式仅在服务器允许页面跨域访问时有效),或使用站点默认设置 1。官方特别发出安全警告,指出代理可能获取代码及凭证信息,因此强烈建议用户仅使用自己运行或完全信任的代理服务器 1。
The Pharo programming language is available to run directly within web browsers through a WebAssembly-based environment. 1 This setup relies on JavaScript and WebAssembly technologies to function. 1 The interface supports loading various file types, including Smalltalk .st files, Pharo .zip archives, and .image files that contain .changes and .sources components. 1
To facilitate interactions with external repositories, the system employs specific mechanisms for security and connectivity. Cloning operations using Iceberg over https:// and loading packages via Metacello’s github:// protocol require access through a CORS proxy. 1 An example format for such a proxy address is provided as "github.com/pharo-project/pharo.git". 1 Users are warned that proxies may view code and credentials, so it is recommended to only use proxies that are personally operated or trusted. 1 The platform offers credential handling options including "My proxy" for routing exclusively through the proxy, "None" for direct host connection, or site defaults. 1 The "None" mode is restricted to servers that explicitly allow page access via CORS policies. 1
评论
还没有评论,欢迎留下第一条。