JavaScript 解释器 MuJS

码农软件 · 软件分类 · 浏览器/JS引擎 · 2019-04-05 14:12:59

软件介绍

MuJS 是一个轻量级的 JavaScript 解释器,用于嵌入到其他的软件中提供脚本执行功能。使用可移植 C 编写,实现了 ECMA-262 规定的 ECMAScript 标准。

开发 MuJS 的原因是 V8、SpiderMonkey 和 JavaScriptCore 都太大太复杂了,MuJS 提供一个非常精简、无错和简单的实现。

示例代码:

#include <stdio.h>
#include <mujs.h>

static void hello(js_State *J)
{
  const char *name = js_tostring(J, 1);
  printf("Hello, %s!\n", name);
  js_pushundefined(J);
}

int main(int argc, char **argv)
{
  js_State *J = js_newstate(NULL, NULL);

  js_newcfunction(J, hello, 1);
  js_setglobal(J, "hello");

  js_dostring(J, "hello('world');", 0);

  js_freestate(J);
}

本文地址:https://codercto.com/soft/d/2916.html

R Cookbook

R Cookbook

Paul Teetor / O'Reilly Media / 2011-3-22 / USD 39.99

With more than 200 practical recipes, this book helps you perform data analysis with R quickly and efficiently. The R language provides everything you need to do statistical work, but its structure ca......一起来看看 《R Cookbook》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具