This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 58e4fc1373b6ee5d3810b7e4668762de87731b2f Mon Sep 17 00:00:00 2001 | |
From: Robbert van Ginkel <rvanginkel@buf.build> | |
Date: Wed, 4 Jan 2023 11:05:15 -0500 | |
Subject: [PATCH] Add wazero based build script | |
To build the quickjs interpreter, some js files need to be transformed into | |
quickjs bytecode using qjsc. | |
--- | |
build.sh | 36 ++++++++++++++++++++++++++++++++++++ | |
qjs.c | 4 ++-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// typedef int (*intFunc) (); | |
// | |
// int | |
// bridge_int_func(intFunc f) | |
// { | |
// return f(); | |
// } | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@io_bazel_rules_go//go:def.bzl", "go_binary") | |
go_binary( | |
name = "go", | |
srcs = ["main.go"], | |
x_defs = {"main.buildtime" : "{BUILD_TIMESTAMP}"} | |
) | |
cc_library( | |
name = "stamp", | |
linkstamp = "stamp.cc", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test") | |
go_library( | |
name = "go_default_library", | |
srcs = ["main.go"], | |
importpath = "github.com/example/project", | |
visibility = ["//visibility:private"], | |
x_defs = { | |
"github.com/example/project.simple": "{BUILD_USER}", | |
"github.com/example/project.compound": "{BUILD_USER}@{BUILD_HOST}", |