Giter VIP home page Giter VIP logo

wasmtimefableraytracerfsharpavalonia's Introduction

Wasmtime executing WASM code in Avalonia.FuncUI desktop app generated by Fable Rust and wasm-pack

Fully F# all the way

Fable Rust Raytracer demo made by @ncave (https://github.com/ncave/fable-raytracer), also check out iOS Static library version https://github.com/delneg/fable-raytracer-ios-net6/

Preview

gif

Fable

This project uses Fable 4 Snake Island Preview.

Please check out this blog post for more info.

Wasmtime

This project uses wasmtime-dotnet to execute Wasm.

Please check out wasmtime website for more info.

Pre-requisites

Build & Run

Using npm

npm run run

Manually

dotnet tool restore
dotnet fable FableRustRaytracer/FableRustRaytracer.fsproj --lang rust --outDir FableRustRaytracer/
# this throws an error, but it's safe to ignore
# ./FableRustRaytracer/RayTracer.fs(157,34): (157,69) error FABLE: System.Double.Pow is not supported by Fable
wasm-pack build FableRustRaytracer/ --target nodejs
dotnet run --project WasiFableRaytracerFSharpAvalonia/WasiFableRaytracerFSharpAvalonia.fsproj

Why ?

Because why not. An example use case for this may be some existing WASM code that you want to use in your desktop app or for example some .NET code that performs better when compiled to Rust and then WASM.

wasmtimefableraytracerfsharpavalonia's People

Contributors

delneg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

renesugar

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.