cranelift-jit-demo
awesome-wasm-langs
Our great sponsors
cranelift-jit-demo | awesome-wasm-langs | |
---|---|---|
8 | 28 | |
595 | 4,025 | |
1.8% | - | |
3.5 | 5.6 | |
9 months ago | 2 days ago | |
Rust | ||
Apache License 2.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cranelift-jit-demo
-
Allocating Heap with Cranelift
I'm working on a small stack-based programming language. I'm currently at a stage where I'm trying to compile it using Cranelift. Altrough the Cranelift documentation is extensive, I'm lacking a broader picture on how to approach some things like heap-allocations and stack-management. The only example project I found are cranelift-jit-demo and this wonderful post.
-
JITting functions in Rust for runtime performance flexibility
First, it's much easier than you think, I swear. I strongly suggest that you start with the cranelift JIT toy language demo, it has everything that you need to get started.
-
We're working on a new WASM/Rust scripting system. Here I'm playing around with a script that changes the day/night cycle.
Fyi I've checked a few (from here; https://github.com/appcypher/awesome-wasm-langs): - assembly script complier is written is typescript/javascript and in theory could be compiled to wasm, and hence could be embedded, but it is only theory as noone has managed to complete this flow - rust-driver requires the linker and calls it as an external tool to link the rustcore to the user code. without the core lib i could not manage to create anything usable. - zig (somewhat similar to rust): on discord some experr said it cannot be embedded and he see no option/plan for it. - lua: they have lua runtime running in wasm, but no transpiller to wasm I've also checked a few other without any success and closest I coild get was the example language for cranelift (https://github.com/bytecodealliance/cranelift-jit-demo)
-
Rust libraries to build a compiler for my language?
JITs are somehow more tricky and differ in the a few points including: a) Codegen is much more time critical. b) JITs must know what's allready generated and what isn't. c) JITs often rely on informations only generated at runtime and must respond to that. See here for a JIT example witten with cranelift: https://github.com/bytecodealliance/cranelift-jit-demo.
-
What is a really cool thing you would want to write in Rust but don't have enough time, energy or bravery for?
You could also try Cranelift. The resulting code isn't as optimized as with LLVM, but it's faster and pleasant to use (and is written in Rust).
-
How to write a compiler or interpreter in rust
Backend IRs for code generation: - Cranelift (see https://github.com/bytecodealliance/cranelift-jit-demo as well as the messages on the Zulip chat if you get stuck)
-
So about the right way to write an interpreter
As for LLVM, I'm not sure if there are any tutorials but I would really advise writing a bytecode interpreter first, unless you already have some grasp of assembly. However, this repository: https://github.com/bytecodealliance/cranelift-jit-demo is really great for learning cranelift which is essentially an LLVM alternative.
-
Cranelift, Part 2: Compiler Efficiency, CFGs, and a Branch Peephole Optimizer
It was mainly built for wasm compilation. So no it is not married to rust. https://github.com/bytecodealliance/cranelift-jit-demo
awesome-wasm-langs
-
Wasm-bpf: Build and run eBPF programs in WebAssembly
Cross-language support for over 30 programming languages for eBPF user space programs
-
I think [...] the "future of computing" is going to be [...] CISC. I’ve read of IBM mainframes that have [hardware instructions for] parsing XML [...]; if you had garbage collection, bounds checking, and type checking in hardware, you’d have fewer and smaller instructions that achieved just as much.
wot
- Why are there no or very few Blazor jobs?
-
Nvidia Security Team: “What if we just stopped using C?”
Just about every language can compile or transpile to WASM:
-
Build a Shopify Function using AssemblyScript
There are also curated lists of languages that compile down to Wasm available on Github, so there is a ton of opportunity to choose your own adventure.
-
We're working on a new WASM/Rust scripting system. Here I'm playing around with a script that changes the day/night cycle.
My current plans are to investigate TinyGo / C# NativeAOT-LLVM / other languages that can compile to Wasm once our host side stabilises a little bit (lots of churn right now!)
-
'The best thing we can do today to JavaScript is to retire it,' says JSON creator Douglas Crockford
Yeah, it's pretty cool. Here's a nice list of all the repositories and stuff like that
-
helix - A post-modern modal text editor
It’s planned to use WASM, which would allow to use basically any language you’d want (ok, any lang having a WASM compiler or VM), including Lua.
-
Fun with Rust
While waiting for placement at Andela, I started something. I wanted to create a community of developers who had already worked on WebAssembly projects in the past. A bit of a back story is in order now. During my exploratory phase before I settled for web development, Web Assembly was announced. So on a whim, I created a Repo to keep track of languages that compile to web assembly. The repo ended up getting over three thousand stars. I honestly didn’t expect it to blow up as much as it did, but it did. That feat fueled my interest in Web Assembly. As I was saying, I wanted to gather Web Assembly developers together for a purpose - to create a common web assembly runtime, a canonical runtime. My attempt at community building didn’t go so well. I sent a couple of emails, and DMs to no avail, or so I thought. It was during this time that Syrus Akbary reached out to me, he pitched the idea he had to build an awesome web assembly runtime, Wasmer, and that he would want me to be involved. He was really excited, and so was I. The only thing was that he said he had to lay down some of the groundwork first. So he worked on it for about a month. Now that I think about it, I should have stuck to him while he laid down the work because when he showed me the progress he had made, I was awe-stricken, but also disadvantaged. A lot of work had been done. Here we were trying to build the web assembly runtime that would take the world by storm, but my knowledge of Rust was meager. Keeping up was hard. Eventually, I had to leave the project, he was incorporating Wasmer as a company, so relocation was being discussed but I wasn’t interested in going to the US. But I think the major deciding factor for me was that I didn’t really align with the management of the project.
- GNO airdrop, what's your thoughts and opinion on it?
What are some alternatives?
crafting-interpreters-rs - Crafting Interpreters in Rust
solidity - Solidity, the Smart Contract Programming Language
rustc_codegen_cranelift - Cranelift based backend for rustc
Scala.js - Scala.js, the Scala to JavaScript compiler
lineiform - A meta-JIT library for Rust interpreters
Flutter - Flutter makes it easy and fast to build beautiful apps for mobile and beyond
slang-v2 - Simple scripting language interpreter
metamask-extension - :globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
rust-langdev - Language development libraries for Rust
bsc - A BNB Smart Chain client based on the go-ethereum fork
coq2rust - Coq to Rust program extraction. The whole tree is on the original Coq code base.
biowasm - WebAssembly modules for genomics