Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


░██╗░░░░░░░██╗███████╗██████╗░███████╗██████╗░░█████╗░░██████╗████████╗
░██║░░██╗░░██║██╔════╝██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔════╝╚══██╔══╝
░╚██╗████╗██╔╝█████╗░░██████╦╝█████╗░░██████╔╝██║░░██║╚█████╗░░░░██║░░░
░░████╔═████║░██╔══╝░░██╔══██╗██╔══╝░░██╔══██╗██║░░██║░╚═══██╗░░░██║░░░
░░╚██╔╝░╚██╔╝░███████╗██████╦╝██║░░░░░██║░░██║╚█████╔╝██████╔╝░░░██║░░░
░░░╚═╝░░░╚═╝░░╚══════╝╚═════╝░╚═╝░░░░░╚═╝░░╚═╝░╚════╝░╚═════╝░░░░╚═╝░░░
                  "putting chain on the web!"
                  
============= A Nebania Project =============
---------------------------------------------------------------------------
Version   : 0.2.2 (Development) 
Creator   : Tohar777
Developer : Tohar777
PROJECT   : Nebania Webfrost
LANGUAGE  : C++
STATUS    : Active Development
DISCORD   : https://discord.gg/C6S6kn7dNz

Webfrost(the ActiveFX Successor) it's a platform for the robust and dynamic chainlang.

Features

  • supports every chain/link program out of the box(meaning no additional changes for the current codebase) -easy to intergrate to every website with a small JS script

Building

  1. getting the source code:
git clone https://github.com/Nebania/webfrost.git
cd webfrost
  1. building the project using make:
make          # for a standard build
make debug    # for a build with debug symbols (for development)
make release  # for an optimized build

Usage

1.make a chain program(adding the type to not make the browser think it's JS code!)

    <script type="application/x-webfrost"> 
        # prints into console
        print("Hello Webfrost)    
    </script>

2.embedding webfrost(.wasm and .js)

<script type="module">
    import createWebFrost from "./webfrost.js";

    const canvas = document.getElementById("canvas");

    if (!canvas) {
        throw new Error("WebFrost canvas #canvas was not found");
    }


    const Module = await createWebFrost({
        canvas: canvas //if using gui_ or audio_ because of raylib
    });

    const script = document.querySelector(
        'script[type="application/x-webfrost"], script[type="application/x-nebania"]'
    );

    if (!script) {
        console.warn("No ChainLang script found");
    } else {
        
        const source = script.textContent;

        console.log("WebFrost source:", JSON.stringify(source));

        try {

            await Module.ccall(
                "webfrost_run",
                null,
                ["string", "boolean"],
                [source, false],
                {
                    async: true
                }
            );

            console.log("WebFrost program finished");
        } catch (error) {
            console.error("WebFrost execution failed:", error);
        }
    }

and now you got a website using chainlang :D

git init git add * git commit -m "first commit" git branch -M main git remote add origin https://github.com/Nebania/WebFrost.git git push -u origin main

About

Webfrost(the ActiveFX Successor) it's a platform for the robust and dynamic chainlang

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages