fubark / zig-v8 Goto Github PK
View Code? Open in Web Editor NEWSimple V8 builds with C and Zig bindings.
License: MIT License
Simple V8 builds with C and Zig bindings.
License: MIT License
I am trying to follow the instructions on MacOS with zig v0.11.0
and get the following error whenever I try to do zig build get-tools
or zig build get-v8
:
/Users/munjalapatel/workspace/playground/zig-v8/build.zig:362:42: error: root struct of file 'Build' has no member named 'LogStep'
fn createGetTools(b: *Builder) *std.build.LogStep {
~~~~~~~~~^~~~~~~~
referenced by:
build: /Users/munjalapatel/workspace/playground/zig-v8/build.zig:21:23
runBuild__anon_6791: /Users/munjalapatel/.zig/lib/std/Build.zig:1639:37
remaining reference traces hidden; use '-freference-trace' to see all reference traces
I have tested this on Linux and Windows and am seeing the same build error.
This is with 10654d4, which added support for 0.12.0-dev
, I'm a bit of a Zig newbie, so not sure how to fix this yet.
@almmiko any idea?
zig version
: 0.12.0-dev.1286+cc394431a
zig build get-tools
zig-v8\build.zig:639:23: error: no field or member function named 'exec' in 'Build'
_ = self.b.exec(&.{ "git", "clone", "--depth=1", "--branch", v8_rev, "https://chromium.googlesource.com/v8/v8.git", "v8" });
~~~~~~^~~~~
C:\dev\zig-windows-x86_64-0.12.0-dev.1286+cc394431a\lib\std\Build.zig:1:1: note: struct declared here
const std = @import("std.zig");
^~~~~
referenced by:
create: C:\dev\zig-v8\build.zig:568:27
createGetV8: C:\dev\zig-v8\build.zig:355:36
remaining reference traces hidden; use '-freference-trace' to see all reference traces
Hello, I am trying to build zig-v8
using the build instructions provided in the ReadME
However I get the following error:
/run/media/kittycat/Linux_files/zigstuff/zig-v8/build.zig:643:23: error: no field or member function named 'run' in 'Build'
_ = self.b.run(&.{ "git", "clone", "--depth=1", "--branch", v8_rev, "https://chromium.googlesource.com/v8/v8.git", "v8" });
~~~~~~^~~~
/usr/lib/zig/std/Build.zig:1:1: note: struct declared here
const std = @import("std.zig");
^~~~~
referenced by:
create: /run/media/kittycat/Linux_files/zigstuff/zig-v8/build.zig:568:27
createGetV8: /run/media/kittycat/Linux_files/zigstuff/zig-v8/build.zig:355:36
remaining reference traces hidden; use '-freference-trace' to see all reference traces
Zig version: 0.11.0(latest)
[kittycat@kittycat zig-v8]$ zig version
0.11.0
I guess there have been API changes?
Currently passing in -Dzig-toolchain injects "zig c++" into the compile/link commands but the overall build is still initiated with gn and ninja. It would be nice to build v8 directly with zig by just adding the necessary sources and flags. There are some prebuild steps that also need to be ported to build.zig like compiling torque files, running mksnapshot, and linking the resulting snapshot (with all the builtins) into the final v8 build.
Hey @fubark, first of, great work! I've had a quick poke at build.zig
and if I understand it correctly, you rely on system build tools to build V8, correct? If you could drop-in zig cc
and zig c++
instead, you should be able to build arm64 macOS on any host (provided we are not missing any relevant libc headers in Zig). Just thought I'd drop this suggestion :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.