https://github.com/ncave/fable-raytracer
https://github.com/ncave/fable-raytracer
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ncave/fable-raytracer
- Owner: ncave
- License: mit
- Created: 2022-01-10T05:18:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-11T16:41:03.000Z (about 1 year ago)
- Last Synced: 2025-05-11T17:33:21.963Z (about 1 year ago)
- Language: F#
- Size: 171 KB
- Stars: 54
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# fable-raytracer
Small ray tracer demo of the F# to Rust language transpiler in [Fable](https://github.com/fable-compiler/Fable)
### Online demo:
https://ncave.github.io/fable-raytracer/
### Build and run:
- install [.NET](https://dotnet.microsoft.com/en-us/download) and [Node.js](https://nodejs.org/en/)
- install [Rust](https://www.rust-lang.org/tools/install) and [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)
- run `dotnet tool restore` to get [Fable](https://github.com/fable-compiler/Fable) installed locally
- run one of the performance tests:
- `npm run test-js-node` (F# to JavaScript, running in Node.js)
- `npm run test-wasm-web` (F# to Rust to WebAssembly, in Browser, localhost:8080)
- `npm run test-wasm-node` (F# to Rust to WebAssembly, running in Node.js)
- `npm run test-rust` (F# to Rust, running as native binary)
- `npm run test-rust-target-cpu` (as above, but allow Rust to target your CPU and use newer instructions)
- `npm run test-python` (F# to Python, running as Python)
- `npm run test-dotnet` (F# running on .NET as managed code)
- `npm run test-native` (F# running on .NET as native binary)
- `npm run test-dotnet-wasm` (F# .NET to WebAssembly AOT, running in Node.js)
- (needs `dotnet workload install wasm-tools`)