Skip to content

sajikix/js-minimal-runtime-for-mf2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-minimal-runtime-for-mf2

このレポジトリはフロントエンドカンファレンス北海道 2025 での LT で発表した「自作 JS エンジンに推しプロポーザルを実装したい!」のためのサンプル実装です。

概要

Intl.MessageFormat の提案されている仕様のうち、format 関数の機能を限定的に実行できる JavaScript エンジンを Rust で実装しています。

試し方

ビルドしたバイナリに JavaScript のコードのパスを渡して実行します。

cargo run -- path/to/your/javascript/file.js

実行すると、読み込んだ JS のコードと実行結果を出力します。

const mf = new Intl.MessageFormat("en", "Hello {$place}!");
mf.format({ place: "World" });

> Hello World!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages