js-runtime: Upload source code from upstream

This commit is contained in:
iddev5 2022-07-06 17:49:35 +05:30 committed by Stephen Gutekanst
parent 34514699a1
commit d10ab25c5d
5 changed files with 567 additions and 0 deletions

22
js-runtime/build.zig Normal file
View file

@ -0,0 +1,22 @@
const std = @import("std");
pub fn build(b: *std.build.Builder) void {
const mode = b.standardReleaseOptions();
const main_tests = b.addTest("src/main.zig");
main_tests.addPackage(pkg);
main_tests.setBuildMode(mode);
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&main_tests.step);
}
pub const pkg = std.build.Pkg{
.name = "js-runtime",
.source = .{ .path = thisDir() ++ "/src/main.zig" },
.dependencies = &[_]std.build.Pkg{},
};
fn thisDir() []const u8 {
return std.fs.path.dirname(@src().file) orelse ".";
}