GithubHelp home page GithubHelp logo

ciao-lang / ciaowasm Goto Github PK

View Code? Open in Web Editor NEW
6.0 5.0 0.0 86 KB

Ciao Prolog for Javascript (w/ WebAssembly)

License: GNU Lesser General Public License v3.0

Shell 0.62% Prolog 34.01% JavaScript 63.27% C 2.10%
prolog webassembly ciao-prolog javascript wasm

ciaowasm's Introduction

Ciao Prolog for JavaScript

This bundle provides a Ciao engine variant for WebAssembly Emscripten, and a high-level JS client (ciao-prolog.js). It also provides a wasm build grade (see src_builder/), necessary to pack and distribute bundles for this backend.

Build and Usage

Install and enable Emscripten SDK (EMSDK). Then use the build.sh script to prepare a build. Build and installation will populate the build/site/ directory in the current workspace.

This interface is used in the Ciao Playground and (LPdoc) Active Logic Documents to provide client-side Prolog execution in the browser.

Additionally, experimental support for Node.js is available:

$ node build/site/js/ciao-prolog.js
Ciao 1.22.0 (2023-04-27 11:02:14 +0200) [EMSCRIPTENwasm32]
?- 

Documentation of JavaScript bindings

Documentation of JavaScript bindings is auto-generated using JSDoc.

jsdoc -c Manifest/jsdoc-conf.json

The HTML documentation will be generated in the doc/js/ folder. Install jsdoc with npm install -g jsdoc (or npm install --save-dev jsdoc locally).

Caveats

  • Operations repending on blocking IO (like console interaction) are not handled nicely in Emscripten. Asyncify may be considered as an option but we must study its impact on performance (but it is written to be large and slow without -O3).

ciaowasm's People

Contributors

jfmc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ciaowasm's Issues

Can't build ciaowasm

Error message

error build ciaowasm

Previous steps

  • Installed Emscripten and activated environment variables in the current terminal.
  • Installed ciao using the one-liner curl https://ciao-lang.org/boot -sSfL | sh
    installation_options
  • Fetched ciaowasm using ciao fetch ciaowasm
  • Tried to build by using ciao build ciaowasm

Looking for missing file

Could not find the folder .ciao/build-boot specified in the missing file path in my system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.