File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -113,4 +113,21 @@ pub fn build(b: *std.Build) void {
113113 const test_step = b .step ("test" , "Run unit tests" );
114114 test_step .dependOn (& run_lib_unit_tests .step );
115115 test_step .dependOn (& run_exe_unit_tests .step );
116+
117+ // Creates a step for generating documentation
118+ const lib_docs = b .addObject (.{
119+ .name = "micrograd-docs" ,
120+ .root_module = lib_mod ,
121+ });
122+
123+ // Generate documentation and install it to zig-out/docs
124+ const docs = lib_docs .getEmittedDocs ();
125+ const install_docs = b .addInstallDirectory (.{
126+ .source_dir = docs ,
127+ .install_dir = .prefix ,
128+ .install_subdir = "docs" ,
129+ });
130+
131+ const docs_step = b .step ("docs" , "Generate and install documentation" );
132+ docs_step .dependOn (& install_docs .step );
116133}
Original file line number Diff line number Diff line change 1+ //! This file provides
2+
3+ const std = @import ("std" );
4+ const arch = @import ("../arch/arch.zig" );
5+
6+ /// Represents a Scalar value
7+ pub fn Value (comptime T : type ) type {
8+ return struct {
9+ /// Value of the register
10+ value : T ,
11+
12+ /// Initialize the Value
13+ pub fn init (value : T ) @This () {
14+ return @This (){
15+ .value = value ,
16+ };
17+ }
18+
19+ };
20+ }
You can’t perform that action at this time.
0 commit comments